Skip to content

Commit b47d1f0

Browse files
committed
TEST/MINOR: global: fix tests to accomodate new global structs
1 parent 809d8bf commit b47d1f0

File tree

6 files changed

+55
-49
lines changed

6 files changed

+55
-49
lines changed

e2e/tests/global/data/put.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"runtime_apis": [
3-
{
4-
"address": "/var/lib/haproxy/stats",
5-
"level": "admin"
6-
}
7-
],
8-
"daemon": "enabled",
9-
"master-worker": true,
10-
"maxconn": 5000,
11-
"pidfile": "/var/run/haproxy.pid"
12-
}
2+
"runtime_apis": [
3+
{
4+
"address": "/var/lib/haproxy/stats",
5+
"level": "admin"
6+
}
7+
],
8+
"daemon": true,
9+
"master-worker": true,
10+
"performance_options": {
11+
"maxconn": 5000
12+
},
13+
"pidfile": "/var/run/haproxy.pid"
14+
}

e2e/tests/global/data/put_2.8.json

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
{
2-
"runtime_apis": [
3-
{
4-
"address": "/var/lib/haproxy/stats",
5-
"level": "admin"
6-
}
7-
],
8-
"tune_options": {
9-
"h2_be_initial_window_size": 20,
10-
"h2_be_max_concurrent_streams": 21,
11-
"h2_fe_initial_window_size": 22,
12-
"h2_fe_max_concurrent_streams": 23
13-
},
14-
"daemon": "enabled",
15-
"master-worker": true,
16-
"maxconn": 5000,
17-
"pidfile": "/var/run/haproxy.pid"
18-
}
2+
"runtime_apis": [
3+
{
4+
"address": "/var/lib/haproxy/stats",
5+
"level": "admin"
6+
}
7+
],
8+
"tune_options": {
9+
"h2_be_initial_window_size": 20,
10+
"h2_be_max_concurrent_streams": 21,
11+
"h2_fe_initial_window_size": 22,
12+
"h2_fe_max_concurrent_streams": 23
13+
},
14+
"performance_options": {
15+
"maxconn": 5000
16+
},
17+
"daemon": true,
18+
"master-worker": true,
19+
"pidfile": "/var/run/haproxy.pid"
20+
}

e2e/tests/global/data/put_socket.json

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
{
2-
"runtime_apis": [
3-
{
4-
"address": "/var/lib/haproxy/stats-new",
5-
"level": "admin"
6-
}
7-
],
8-
"daemon": "enabled",
9-
"master-worker": true,
10-
"maxconn": 5000,
11-
"pidfile": "/var/run/haproxy.pid"
12-
}
2+
"runtime_apis": [
3+
{
4+
"address": "/var/lib/haproxy/stats-new",
5+
"level": "admin"
6+
}
7+
],
8+
"daemon": true,
9+
"master-worker": true,
10+
"performance_options": {
11+
"maxconn": 5000
12+
},
13+
"pidfile": "/var/run/haproxy.pid"
14+
}

e2e/tests/global/get.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ load 'utils/_helpers'
3030
assert_equal "$(get_json_path "$BODY" '.chroot')" "/var/lib/haproxy"
3131
assert_equal "$(get_json_path "$BODY" '.user')" "haproxy"
3232
assert_equal "$(get_json_path "$BODY" '.group')" "haproxy"
33-
assert_equal "$(get_json_path "$BODY" '.maxconn')" "4000"
33+
assert_equal "$(get_json_path "$BODY" '.performance_options.maxconn')" "4000"
3434
assert_equal "$(get_json_path "$BODY" '.pidfile')" "/var/run/haproxy.pid"
3535
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].address')" "/var/lib/haproxy/stats"
3636
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].level')" "admin"
3737
if haproxy_version_ge "2.8"; then
38-
assert_equal "$(get_json_path "$BODY" '.tune_options.ssl_ocsp_update_min_delay')" "10"
38+
assert_equal "$(get_json_path "$BODY" '.tune_ssl_options.ocsp_update_min_delay')" "10"
3939
assert_equal "$(get_json_path "$BODY" '.tune_options.stick_counters')" "50"
4040
assert_equal "$(get_json_path "$BODY" '.tune_options.h2_be_initial_window_size')" "10"
4141
assert_equal "$(get_json_path "$BODY" '.tune_options.h2_be_max_concurrent_streams')" "11"

e2e/tests/global/replace.bats

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

3030
resource_get "$_GLOBAL_BASE_PATH" ""
3131
assert_equal "$SC" 200
32-
assert_equal "$(get_json_path "$BODY" '.maxconn')" "5000"
33-
assert_equal "$(get_json_path "$BODY" '.daemon')" "enabled"
32+
assert_equal "$(get_json_path "$BODY" '.performance_options.maxconn')" "5000"
33+
assert_equal "$(get_json_path "$BODY" '.daemon')" "true"
3434
assert_equal "$(get_json_path "$BODY" '.pidfile')" "/var/run/haproxy.pid"
3535
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].address')" "/var/lib/haproxy/stats"
3636
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].level')" "admin"
@@ -43,8 +43,8 @@ load 'utils/_helpers'
4343

4444
resource_get "$_GLOBAL_BASE_PATH" ""
4545
assert_equal "$SC" 200
46-
assert_equal "$(get_json_path "$BODY" '.maxconn')" "5000"
47-
assert_equal "$(get_json_path "$BODY" '.daemon')" "enabled"
46+
assert_equal "$(get_json_path "$BODY" '.performance_options.maxconn')" "5000"
47+
assert_equal "$(get_json_path "$BODY" '.daemon')" "true"
4848
assert_equal "$(get_json_path "$BODY" '.pidfile')" "/var/run/haproxy.pid"
4949
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].address')" "/var/lib/haproxy/stats-new"
5050
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].level')" "admin"
@@ -74,8 +74,8 @@ load 'utils/_helpers'
7474
# check configuration has been applied
7575
resource_get "$_GLOBAL_BASE_PATH" ""
7676
assert_equal "$SC" 200
77-
assert_equal "$(get_json_path "$BODY" '.maxconn')" "5000"
78-
assert_equal "$(get_json_path "$BODY" '.daemon')" "enabled"
77+
assert_equal "$(get_json_path "$BODY" '.performance_options.maxconn')" "5000"
78+
assert_equal "$(get_json_path "$BODY" '.daemon')" "true"
7979
assert_equal "$(get_json_path "$BODY" '.pidfile')" "/var/run/haproxy.pid"
8080
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].address')" "/var/lib/haproxy/stats-new"
8181
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].level')" "admin"

e2e/tests/global/replace_2.8.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ load 'utils/_helpers'
3232

3333
resource_get "$_GLOBAL_BASE_PATH" ""
3434
assert_equal "$SC" 200
35-
assert_equal "$(get_json_path "$BODY" '.maxconn')" "5000"
36-
assert_equal "$(get_json_path "$BODY" '.daemon')" "enabled"
35+
assert_equal "$(get_json_path "$BODY" '.performance_options.maxconn')" "5000"
36+
assert_equal "$(get_json_path "$BODY" '.daemon')" "true"
3737
assert_equal "$(get_json_path "$BODY" '.pidfile')" "/var/run/haproxy.pid"
3838
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].address')" "/var/lib/haproxy/stats"
3939
assert_equal "$(get_json_path "$BODY" '.runtime_apis[0].level')" "admin"

0 commit comments

Comments
 (0)