Skip to content

Commit 736abbb

Browse files
committed
MEDIUM: spec: generate code from latest client-native changes
1 parent b3b9fbb commit 736abbb

20 files changed

+166
-270
lines changed

e2e/tests/http_checks/add.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ load 'utils/_helpers'
2929

3030
resource_get "$_CHECKS_BASE_PATH/2" "parent_type=defaults"
3131
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"
3333
}
3434

3535
@test "http_checks: Add a new HTTP Check to backend" {
@@ -38,7 +38,7 @@ load 'utils/_helpers'
3838

3939
resource_get "$_CHECKS_BASE_PATH/2" "parent_type=backend&parent_name=test_backend"
4040
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"
4242
}
4343

4444
@test "http_checks: fail adding an unvalid HTTP Check to backend" {

e2e/tests/http_checks/data/post.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"index": 2,
3-
"action": "disable-on-404"
3+
"type": "disable-on-404"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"index": 2,
3-
"action": "disable-on-404"
3+
"type": "disable-on-404"
44
}

e2e/tests/http_checks/data/post_unvalid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"index": 2,
3-
"action": "send",
3+
"type": "send",
44
"method": "URI",
55
"URI": "/",
66
"headers": "bla"

e2e/tests/http_checks/data/put.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"index": 2,
3-
"action": "send-state"
3+
"type": "send-state"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"index": 1,
3-
"action": "send-state"
3+
"type": "send-state"
44
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"index": 0,
3-
"action": "add-header"
3+
"type": "add-header"
44
}

e2e/tests/http_checks/get.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,22 @@ load 'utils/_helpers'
2626
@test "http_checks: Return one HTTP Check from defaults" {
2727
resource_get "$_CHECKS_BASE_PATH/0" "parent_type=defaults"
2828
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"
3030

3131
resource_get "$_CHECKS_BASE_PATH/1" "parent_type=defaults"
3232
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"
3434
}
3535

3636
@test "http_checks: Return one HTTP Check from backend" {
3737
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"
3939
assert_equal 1 "$(get_json_path "$BODY" ".data.headers | length")"
4040
assert_equal "$(get_json_path "$BODY" ".data.headers[0].name")" "host"
4141
assert_equal "$(get_json_path "$BODY" ".data.headers[0].fmt")" "haproxy.1wt.eu"
4242

4343
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"
4545
assert_equal "$(get_json_path "$BODY" ".data.match")" "status"
4646
assert_equal "$(get_json_path "$BODY" ".data.pattern")" "200-399"
4747
}

e2e/tests/http_checks/list.bats

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,22 +28,22 @@ load 'utils/_helpers'
2828
assert_equal "$SC" 200
2929
assert_equal 2 "$(get_json_path "$BODY" ".data | length")"
3030

31-
assert_equal "$(get_json_path "$BODY" ".data[0].action")" "send-state"
31+
assert_equal "$(get_json_path "$BODY" ".data[0].type")" "send-state"
3232

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"
3434
}
3535

3636
@test "http_checks: Return an array of HTTP Checks from backend" {
3737
resource_get "$_CHECKS_BASE_PATH" "parent_type=backend&parent_name=test_backend"
3838
assert_equal "$SC" 200
3939
assert_equal 2 "$(get_json_path "$BODY" ".data | length")"
4040

41-
assert_equal "$(get_json_path "$BODY" ".data[0].action")" "send"
41+
assert_equal "$(get_json_path "$BODY" ".data[0].type")" "send"
4242
assert_equal 1 "$(get_json_path "$BODY" ".data[0].headers | length")"
4343
assert_equal "$(get_json_path "$BODY" ".data[0].headers[0].name")" "host"
4444
assert_equal "$(get_json_path "$BODY" ".data[0].headers[0].fmt")" "haproxy.1wt.eu"
4545

46-
assert_equal "$(get_json_path "$BODY" ".data[1].action")" "expect"
46+
assert_equal "$(get_json_path "$BODY" ".data[1].type")" "expect"
4747
assert_equal "$(get_json_path "$BODY" ".data[1].match")" "status"
4848
assert_equal "$(get_json_path "$BODY" ".data[1].pattern")" "200-399"
4949
}

e2e/tests/http_checks/replace.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ load 'utils/_helpers'
2929

3030
resource_get "$_CHECKS_BASE_PATH/1" "parent_type=defaults"
3131
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"
3333
}
3434

3535
@test "http_checks: Replace a HTTP Check of backend" {
@@ -38,7 +38,7 @@ load 'utils/_helpers'
3838

3939
resource_get "$_CHECKS_BASE_PATH/1" "parent_type=backend&parent_name=test_backend"
4040
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"
4242
}
4343

4444
@test "http_checks: Fail replacing a HTTP Check of unexisting backend" {

0 commit comments

Comments
 (0)