File tree Expand file tree Collapse file tree 20 files changed +166
-270
lines changed Expand file tree Collapse file tree 20 files changed +166
-270
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ load 'utils/_helpers'
29
29
30
30
resource_get " $_CHECKS_BASE_PATH /2" " parent_type=defaults"
31
31
assert_equal " $SC " 200
32
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " disable-on-404"
32
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " disable-on-404"
33
33
}
34
34
35
35
@test " http_checks: Add a new HTTP Check to backend" {
@@ -38,7 +38,7 @@ load 'utils/_helpers'
38
38
39
39
resource_get " $_CHECKS_BASE_PATH /2" " parent_type=backend&parent_name=test_backend"
40
40
assert_equal " $SC " 200
41
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " disable-on-404"
41
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " disable-on-404"
42
42
}
43
43
44
44
@test " http_checks: fail adding an unvalid HTTP Check to backend" {
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 2 ,
3
- "action " : " disable-on-404"
3
+ "type " : " disable-on-404"
4
4
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 2 ,
3
- "action " : " disable-on-404"
3
+ "type " : " disable-on-404"
4
4
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 2 ,
3
- "action " : " send" ,
3
+ "type " : " send" ,
4
4
"method" : " URI" ,
5
5
"URI" : " /" ,
6
6
"headers" : " bla"
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 2 ,
3
- "action " : " send-state"
3
+ "type " : " send-state"
4
4
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 1 ,
3
- "action " : " send-state"
3
+ "type " : " send-state"
4
4
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"index" : 0 ,
3
- "action " : " add-header"
3
+ "type " : " add-header"
4
4
}
Original file line number Diff line number Diff line change @@ -26,22 +26,22 @@ load 'utils/_helpers'
26
26
@test " http_checks: Return one HTTP Check from defaults" {
27
27
resource_get " $_CHECKS_BASE_PATH /0" " parent_type=defaults"
28
28
assert_equal " $SC " 200
29
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " send-state"
29
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " send-state"
30
30
31
31
resource_get " $_CHECKS_BASE_PATH /1" " parent_type=defaults"
32
32
assert_equal " $SC " 200
33
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " disable-on-404"
33
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " disable-on-404"
34
34
}
35
35
36
36
@test " http_checks: Return one HTTP Check from backend" {
37
37
resource_get " $_CHECKS_BASE_PATH /0" " parent_type=backend&parent_name=test_backend"
38
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " send"
38
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " send"
39
39
assert_equal 1 " $( get_json_path " $BODY " " .data.headers | length" ) "
40
40
assert_equal " $( get_json_path " $BODY " " .data.headers[0].name" ) " " host"
41
41
assert_equal " $( get_json_path " $BODY " " .data.headers[0].fmt" ) " " haproxy.1wt.eu"
42
42
43
43
resource_get " $_CHECKS_BASE_PATH /1" " parent_type=backend&parent_name=test_backend"
44
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " expect"
44
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " expect"
45
45
assert_equal " $( get_json_path " $BODY " " .data.match" ) " " status"
46
46
assert_equal " $( get_json_path " $BODY " " .data.pattern" ) " " 200-399"
47
47
}
Original file line number Diff line number Diff line change @@ -28,22 +28,22 @@ load 'utils/_helpers'
28
28
assert_equal " $SC " 200
29
29
assert_equal 2 " $( get_json_path " $BODY " " .data | length" ) "
30
30
31
- assert_equal " $( get_json_path " $BODY " " .data[0].action " ) " " send-state"
31
+ assert_equal " $( get_json_path " $BODY " " .data[0].type " ) " " send-state"
32
32
33
- assert_equal " $( get_json_path " $BODY " " .data[1].action " ) " " disable-on-404"
33
+ assert_equal " $( get_json_path " $BODY " " .data[1].type " ) " " disable-on-404"
34
34
}
35
35
36
36
@test " http_checks: Return an array of HTTP Checks from backend" {
37
37
resource_get " $_CHECKS_BASE_PATH " " parent_type=backend&parent_name=test_backend"
38
38
assert_equal " $SC " 200
39
39
assert_equal 2 " $( get_json_path " $BODY " " .data | length" ) "
40
40
41
- assert_equal " $( get_json_path " $BODY " " .data[0].action " ) " " send"
41
+ assert_equal " $( get_json_path " $BODY " " .data[0].type " ) " " send"
42
42
assert_equal 1 " $( get_json_path " $BODY " " .data[0].headers | length" ) "
43
43
assert_equal " $( get_json_path " $BODY " " .data[0].headers[0].name" ) " " host"
44
44
assert_equal " $( get_json_path " $BODY " " .data[0].headers[0].fmt" ) " " haproxy.1wt.eu"
45
45
46
- assert_equal " $( get_json_path " $BODY " " .data[1].action " ) " " expect"
46
+ assert_equal " $( get_json_path " $BODY " " .data[1].type " ) " " expect"
47
47
assert_equal " $( get_json_path " $BODY " " .data[1].match" ) " " status"
48
48
assert_equal " $( get_json_path " $BODY " " .data[1].pattern" ) " " 200-399"
49
49
}
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ load 'utils/_helpers'
29
29
30
30
resource_get " $_CHECKS_BASE_PATH /1" " parent_type=defaults"
31
31
assert_equal " $SC " 200
32
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " send-state"
32
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " send-state"
33
33
}
34
34
35
35
@test " http_checks: Replace a HTTP Check of backend" {
@@ -38,7 +38,7 @@ load 'utils/_helpers'
38
38
39
39
resource_get " $_CHECKS_BASE_PATH /1" " parent_type=backend&parent_name=test_backend"
40
40
assert_equal " $SC " 200
41
- assert_equal " $( get_json_path " $BODY " " .data.action " ) " " send-state"
41
+ assert_equal " $( get_json_path " $BODY " " .data.type " ) " " send-state"
42
42
}
43
43
44
44
@test " http_checks: Fail replacing a HTTP Check of unexisting backend" {
You can’t perform that action at this time.
0 commit comments