From 8335a87e14502dc304d8893037d466c9203e73c1 Mon Sep 17 00:00:00 2001 From: Marko Juraga Date: Fri, 20 Sep 2024 09:20:50 +0200 Subject: [PATCH] TEST/MINOR: bats: remove tests for removed track-scx actions and raw --- e2e/tests/raw/get.bats | 2 +- e2e/tests/tcp_request_rules/add_2.8.bats | 20 ------------------- .../data/post-track-sc-x.json | 8 -------- 3 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 e2e/tests/tcp_request_rules/data/post-track-sc-x.json diff --git a/e2e/tests/raw/get.bats b/e2e/tests/raw/get.bats index 4f8410ce..3483f792 100644 --- a/e2e/tests/raw/get.bats +++ b/e2e/tests/raw/get.bats @@ -25,6 +25,6 @@ load 'utils/_helpers' @test "raw: Download configuration" { resource_get "$_RAW_BASE_PATH" assert_equal "$SC" 200 - test -n "$(get_json_path "$BODY" .)" || + test -n "$BODY" || fail "failed to download raw config. BODY: '$BODY'" } diff --git a/e2e/tests/tcp_request_rules/add_2.8.bats b/e2e/tests/tcp_request_rules/add_2.8.bats index ce0d89e0..655ef6ef 100644 --- a/e2e/tests/tcp_request_rules/add_2.8.bats +++ b/e2e/tests/tcp_request_rules/add_2.8.bats @@ -46,26 +46,6 @@ load 'utils/_helpers' fi } -@test "tcp_request_rules: Add a new TCP Request Rule track-sc-x to backend" { - if haproxy_version_ge "2.8" - then - # Using old track-sc(0|1|2) - PARENT_NAME="test_sticksc" - resource_post "$_BACKEND_BASE_PATH/$PARENT_NAME/tcp_request_rules/0" "data/post-track-sc-x.json" "force_reload=true" - assert_equal "$SC" 201 - - resource_get "$_BACKEND_BASE_PATH/$PARENT_NAME/tcp_request_rules/0" - assert_equal "$SC" 200 - assert_equal "$(get_json_path "$BODY" ".action")" "track-sc" - assert_equal "$(get_json_path "$BODY" ".type")" "content" - assert_equal "$(get_json_path "$BODY" ".cond")" "if" - assert_equal "$(get_json_path "$BODY" ".cond_test")" "TRUE" - assert_equal "$(get_json_path "$BODY" ".track_key")" "src" - assert_equal "$(get_json_path "$BODY" ".track_table")" "test_sticksc" - assert_equal "$(get_json_path "$BODY" ".track_stick_counter")" 0 - fi -} - @test "tcp_request_rules: Fail - Add a new TCP Request Rule track-sc to backend - when track_sc_stick_counter is missing" { if haproxy_version_ge "2.8" then diff --git a/e2e/tests/tcp_request_rules/data/post-track-sc-x.json b/e2e/tests/tcp_request_rules/data/post-track-sc-x.json deleted file mode 100644 index 4702acbc..00000000 --- a/e2e/tests/tcp_request_rules/data/post-track-sc-x.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "type": "content", - "action": "track-sc0", - "cond": "if", - "cond_test": "TRUE", - "track_table": "test_sticksc", - "track_key": "src" -}