File tree Expand file tree Collapse file tree 13 files changed +34
-8
lines changed Expand file tree Collapse file tree 13 files changed +34
-8
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,8 @@ load 'utils/_helpers'
6060
6161@test " binds: Add a new bind for peers" {
6262 PARENT_NAME=" fusion"
63- if haproxy_version_ge " 2.5"
63+ # segfault in v3.3
64+ if haproxy_version_ge " 2.5" && ! haproxy_version_ge " 3.3"
6465 then
6566 resource_post " $_PEER_BASE_PATH /$PARENT_NAME /binds" " data/post_2.5.json" " force_reload=true"
6667 assert_equal " $SC " 201
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ frontend test_frontend
3535 http-request del-header X-Del-Frontend if { src 10.1.0.0 /16 }
3636 http-request sc-add-gpc(0 ,1 ) 1 if FALSE
3737
38- frontend test_sticksc
38+ frontend front_sticksc
3939 bind *:1248
4040 default_backend test_sticksc
4141 http-request track-sc0 src table test_sticksc if TRUE
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ load 'utils/_helpers'
2727@test " http_request_rules: Return one track-sc HTTP Request Rule from frontend" {
2828 if haproxy_version_ge " 2.8"
2929 then
30- PARENT_NAME=" test_sticksc "
30+ PARENT_NAME=" front_sticksc "
3131 resource_get " $_FRONTEND_BASE_PATH /$PARENT_NAME /http_request_rules/0"
3232 assert_equal " $SC " 200
3333 assert_equal " $( get_json_path " $BODY " " .type" ) " " track-sc"
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ frontend test_frontend
3535 http-response del-header X-Del-Frontend if { src 10.1.0.0 /16 }
3636 http-response sc-add-gpc(0 ,1 ) 1 if FALSE
3737
38- frontend test_sticksc
38+ frontend front_sticksc
3939 bind *:1248
4040 default_backend test_sticksc
4141 http-response track-sc0 src table test_sticksc if TRUE
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ load 'utils/_helpers'
2828@test " http_response_rules: Return one track-sc HTTP Response Rule from frontend" {
2929 if haproxy_version_ge " 2.8"
3030 then
31- PARENT_NAME=" test_sticksc "
31+ PARENT_NAME=" front_sticksc "
3232 resource_get " $_FRONTEND_BASE_PATH /$PARENT_NAME /http_response_rules/0"
3333 assert_equal " $SC " 200
3434 assert_equal " $( get_json_path " $BODY " " .type" ) " " track-sc"
Original file line number Diff line number Diff line change 1818load ' ../../libs/dataplaneapi'
1919load ' ../../libs/get_json_path'
2020load ' ../../libs/haproxy_config_setup'
21+ load ' ../../libs/haproxy_version'
2122load ' ../../libs/resource_client'
2223load ' ../../libs/version'
2324
2425load ' utils/_helpers'
2526
2627@test " process-manager: Create one new program" {
28+ if haproxy_version_ge " 3.3" ; then skip " programs have been removed in haproxy 3.3" ; fi
29+
2730 resource_post " $_PROGRAMS_BASE_PATH " " data/program.json" " force_reload=true"
2831 assert_equal " $SC " 201
2932
@@ -35,11 +38,15 @@ load 'utils/_helpers'
3538}
3639
3740@test " process-manager: Fail creating program with same name" {
41+ if haproxy_version_ge " 3.3" ; then skip; fi
42+
3843 resource_post " $_PROGRAMS_BASE_PATH " " data/program_duplicated.json" " force_reload=true"
3944 assert_equal " $SC " 409
4045}
4146
4247@test " process-manager: Fail creating program that isn't valid" {
48+ if haproxy_version_ge " 3.3" ; then skip; fi
49+
4350 resource_post " $_PROGRAMS_BASE_PATH " " data/program_invalid.json" " force_reload=true"
4451 assert_equal " $SC " 422
4552}
Original file line number Diff line number Diff line change 1818load ' ../../libs/dataplaneapi'
1919load ' ../../libs/get_json_path'
2020load ' ../../libs/haproxy_config_setup'
21+ load ' ../../libs/haproxy_version'
2122load ' ../../libs/resource_client'
2223load ' ../../libs/version'
2324
2425load ' utils/_helpers'
2526
2627@test " process-manager: Delete one program by name" {
28+ if haproxy_version_ge " 3.3" ; then skip; fi
29+
2730 resource_delete " $_PROGRAMS_BASE_PATH /echo" " force_reload=true"
2831 assert_equal " $SC " 204
2932
@@ -32,6 +35,8 @@ load 'utils/_helpers'
3235}
3336
3437@test " process-manager: Fail deleting app that doesn't exist" {
38+ if haproxy_version_ge " 3.3" ; then skip; fi
39+
3540 resource_delete " $_PROGRAMS_BASE_PATH /i_am_not_here" " force_reload=true"
3641 assert_equal " $SC " 404
3742}
Original file line number Diff line number Diff line change 1818load ' ../../libs/dataplaneapi'
1919load ' ../../libs/get_json_path'
2020load ' ../../libs/haproxy_config_setup'
21+ load ' ../../libs/haproxy_version'
2122load ' ../../libs/resource_client'
2223load ' ../../libs/version'
2324
2425load ' utils/_helpers'
2526
2627@test " process-manager: Return one program by name" {
28+ if haproxy_version_ge " 3.3" ; then skip; fi
29+
2730 resource_get " $_PROGRAMS_BASE_PATH /echo"
2831 assert_equal " $SC " 200
2932 assert_equal " echo" " $( get_json_path " $BODY " " .name" ) "
3033}
3134
3235@test " process-manager: Fail returning program that doesn't exist" {
36+ if haproxy_version_ge " 3.3" ; then skip; fi
37+
3338 resource_get " $_PROGRAMS_BASE_PATH /i_am_not_here"
3439 assert_equal " $SC " 404
3540}
Original file line number Diff line number Diff line change 1818load ' ../../libs/dataplaneapi'
1919load ' ../../libs/get_json_path'
2020load ' ../../libs/haproxy_config_setup'
21+ load ' ../../libs/haproxy_version'
2122load ' ../../libs/resource_client'
2223load ' ../../libs/version'
2324
2425load ' utils/_helpers'
2526
2627@test " process-manager: Return an array of programs" {
28+ if haproxy_version_ge " 3.3" ; then skip; fi
29+
2730 resource_get " $_PROGRAMS_BASE_PATH "
2831 assert_equal " $SC " 200
2932 assert_equal 1 " $( get_json_path " $BODY " " . | length" ) "
Original file line number Diff line number Diff line change 1818load ' ../../libs/dataplaneapi'
1919load ' ../../libs/get_json_path'
2020load ' ../../libs/haproxy_config_setup'
21+ load ' ../../libs/haproxy_version'
2122load ' ../../libs/resource_client'
2223load ' ../../libs/version'
2324
2425load ' utils/_helpers'
2526
2627@test " process-manager: Replace one program" {
28+ if haproxy_version_ge " 3.3" ; then skip; fi
29+
2730 resource_put " $_PROGRAMS_BASE_PATH /echo" " data/program_duplicated.json" " force_reload=true"
2831 assert_equal " $SC " 200
2932
@@ -34,6 +37,8 @@ load 'utils/_helpers'
3437}
3538
3639@test " process-manager: Fail replacing program that doesn't exist" {
40+ if haproxy_version_ge " 3.3" ; then skip; fi
41+
3742 resource_put " $_PROGRAMS_BASE_PATH /i_am_not_here" " data/program_duplicated.json" " force_reload=true"
3843 assert_equal " $SC " 409
3944}
You can’t perform that action at this time.
0 commit comments