File tree Expand file tree Collapse file tree 6 files changed +20
-6
lines changed Expand file tree Collapse file tree 6 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1+ # this is an empty map file
Original file line number Diff line number Diff line change @@ -25,3 +25,7 @@ frontend fe_map
2525frontend fe_map2
2626 bind *:2358
2727 use_backend %[str(example.com),map(/tmp/maps/mapfile2.map)]
28+
29+ frontend fe_map_empty
30+ bind *:5678
31+ use_backend %[str(example.com),map(/tmp/maps/empty.map)]
Original file line number Diff line number Diff line change @@ -38,3 +38,9 @@ load 'utils/_helpers'
3838 resource_get " $_RUNTIME_MAP_ENTRIES_BASE_PATH " " map=not-exists.map"
3939 assert_equal " $SC " 404
4040}
41+
42+ @test " runtime_maps_entries: https://github.com/haproxytech/dataplaneapi/issues/234" {
43+ resource_get " $_RUNTIME_MAP_ENTRIES_BASE_PATH " " map=empty.map"
44+ assert_equal " $SC " 200
45+ assert_equal " $( $BODY ) " " "
46+ }
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ defaults
2727 timeout check 10s
2828 maxconn 3000
2929
30+ frontend test_empty_storage_map
31+ use_backend %[str(active),map(/etc/haproxy/maps/mapfile_empty.map)]
32+
3033frontend test_storage_maps
3134 bind *:1337 crt
3235 #use_backend %[str(active),map(/etc/haproxy/maps/mapfile_example2.map)]
@@ -36,4 +39,3 @@ frontend test_storage_maps
3639
3740backend test_storage_maps
3841 server appx 127.0.0.1:8080 check disabled
39-
Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ require (
2222 github.com/go-openapi/validate v0.19.8
2323 github.com/google/renameio v1.0.1
2424 github.com/google/uuid v1.2.0
25- github.com/haproxytech/client-native/v2 v2.5.5
26- github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220107093215-b580bd3a8a90
25+ github.com/haproxytech/client-native/v2 v2.5.6
26+ github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220215134434-54d66ef01d26
2727 github.com/hashicorp/consul/api v1.6.0
2828 github.com/hashicorp/hcl v1.0.0
2929 github.com/jessevdk/go-flags v1.4.0
Original file line number Diff line number Diff line change @@ -177,10 +177,11 @@ github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+
177177github.com/google/uuid v1.1.1 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
178178github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs =
179179github.com/google/uuid v1.2.0 /go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo =
180- github.com/haproxytech/client-native/v2 v2.5.5 h1:1s0oxyNJhKFvC2BZzHaqCjibaTyjZHU84XJ3/HtMHag =
181- github.com/haproxytech/client-native/v2 v2.5.5 /go.mod h1:S7CBbMb7hP8nxiL+PE2edFVMOMO7Uvptvr7hAQw5IJk =
182- github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220107093215-b580bd3a8a90 h1:OSCqtgyvhMVgAA9aIX1zN8FkiQwL/gp9h7Eqvt58hfg =
180+ github.com/haproxytech/client-native/v2 v2.5.6 h1:qxxm3SMKXC3UITSrdShjQE+0dfGjMJQ2eXKpGUi81IM =
181+ github.com/haproxytech/client-native/v2 v2.5.6 /go.mod h1:S7CBbMb7hP8nxiL+PE2edFVMOMO7Uvptvr7hAQw5IJk =
183182github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220107093215-b580bd3a8a90 /go.mod h1:pEuHx+aFhn0lIdvAg1OaawQfeRkpq1I8HzjtZN4/PLI =
183+ github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220215134434-54d66ef01d26 h1:IWU3pWA4MzYzi0N5NDUgMf06V6bmXCsHok0hBMM1Zik =
184+ github.com/haproxytech/config-parser/v4 v4.0.0-rc2.0.20220215134434-54d66ef01d26 /go.mod h1:pEuHx+aFhn0lIdvAg1OaawQfeRkpq1I8HzjtZN4/PLI =
184185github.com/haproxytech/go-logger v1.0.1-0.20211022075555-178f1cdf4d84 h1:rSLHjJ4VGvMZcGAGQ9GaXuhvdswu1iLVXTThLX6OKN8 =
185186github.com/haproxytech/go-logger v1.0.1-0.20211022075555-178f1cdf4d84 /go.mod h1:OekUd8HCb7ubxMplzHUPBTHNxZmddOWfOjWclZsqIeM =
186187github.com/hashicorp/consul/api v1.6.0 h1:SZB2hQW8AcTOpfDmiVblQbijxzsRuiyy0JpHfabvHio =
You can’t perform that action at this time.
0 commit comments