Skip to content

Commit 930572d

Browse files
committed
BUILD/MINOR: add test for ca-verify-file bind parameter
Signed-off-by: Vincent Gramer <[email protected]>
1 parent 72bcaac commit 930572d

File tree

8 files changed

+26
-4
lines changed

8 files changed

+26
-4
lines changed

e2e/tests/binds/add.bats

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,6 @@ load 'utils/_helpers'
3838
assert_equal "$SC" 200
3939
assert_equal "$(get_json_path "$BODY" '.data.name')" "test_bind"
4040
assert_equal "1/all" "$(get_json_path "$BODY" ".data.thread")"
41+
assert_equal "$(get_json_path "$BODY" '.data.ca_verify_file')" "/certs/ca-verify.pem"
4142
fi
4243
}

e2e/tests/binds/add_2.8.bats

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,6 @@ load 'utils/_helpers'
3434
assert_equal "$SC" 200
3535
assert_equal "$(get_json_path "$BODY" '.data.name')" "test_bind"
3636
assert_equal "$(get_json_path "$BODY" ".data.no_alpn")" "true"
37+
assert_equal "$(get_json_path "$BODY" '.data.ca_verify_file')" "/certs/ca-verify.pem"
3738
fi
3839
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
-----BEGIN CERTIFICATE-----
2+
MIICsjCCAZqgAwIBAgICEAEwDQYJKoZIhvcNAQELBQAwEzERMA8GA1UEAwwISW50
3+
ZXJtMS4wHhcNMjAxMTI1MTIxMjA0WhcNMjExMTI1MTIxMjA0WjATMREwDwYDVQQD
4+
DAhJbnRlcm0yLjCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKto0lJW
5+
e+0+6u/gxG3NNfoqHWAMiDm+Ogcv1aIUTxTK8CO6dlwLTAMDg47wXgZSE+fpwtJf
6+
OCV9uwUvoVrdBazPil13KTQKHkN3jV6TnrU92gJpb1uBCQwQQXvCaQeUrMNPC7h3
7+
lYaxAODH62B5Pl2PY/DXdaKNbsN0chOZmNl87FgtXH4/ITOqqHY/vLW4ikYbADHi
8+
HLZOXFFV6VK6tNm5NgbKpDeUG5I5mjilZSfxnHHJAFIrIy19wK+wyPr9X+Eyph7Z
9+
slYDDZ/+RRIEp3tNlaac+g+uv1CJZWdRcTb+q/fAMd/emL0ofg3XKRNtSwfDuDNh
10+
z7i68VKL/6Xtd3cCAwEAAaMQMA4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQsF
11+
AAOCAQEAYUwKKDKMG0ZwUJwJuqXZfCrf+95t9aeb+ALcFw7gABrdSFY9VmDQj2wW
12+
wl1afkV0jAREEnOtHJ0wioAhD86TUMoj99+UMEtp/r9QPH1XMClnCS0kp1M9ogCu
13+
PlqFamJlKhIa3xvvKSamU6G7qlbVzi2y7x/SBhK/U/FDo4bElgwG6WVXsluOQ6fT
14+
uUAJTqNfWcSdw2ntIGbwlbg1sco3a2JENB/5tyTSIWlwwUo6d+s2W3ZcNePWAPdr
15+
gEAVV1yOWsb1OVse2NRye5lH3cc+x0O1XYzWiC6G3GWYUmoPhl50fsidrd6WQIt5
16+
+6MXQJQW+CgBnPiCdSfN58mxv49xJQ==
17+
-----END CERTIFICATE-----

e2e/tests/binds/data/haproxy.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ defaults
2828
frontend test_frontend
2929
mode tcp
3030
maxconn 1000
31-
bind localhost:9000 name fixture
31+
bind localhost:9000 name fixture ca-verify-file
3232
bind localhost:9090 name loopback
3333
option httpclose

e2e/tests/binds/data/haproxy_2.5.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ defaults
2828
frontend test_frontend
2929
mode tcp
3030
maxconn 1000
31-
bind localhost:9000 name fixture thread all
31+
bind localhost:9000 name fixture thread all ca-verify-file /certs/ca-verify.pem
3232
bind localhost:9090 name loopback thread 1/1
3333
bind localhost:9091 name loopback1 thread 1/1-1
3434
option httpclose

e2e/tests/binds/data/post_2.5.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
"port": 10000,
55
"defer_accept": true,
66
"allow_0rtt": true,
7-
"thread": "1/all"
7+
"thread": "1/all",
8+
"ca_verify_file": "/certs/ca-verify.pem"
89
}

e2e/tests/binds/data/post_2.8.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
"defer_accept": true,
66
"allow_0rtt": true,
77
"thread": "1/all",
8-
"no_alpn": true
8+
"no_alpn": true,
9+
"ca_verify_file": "/certs/ca-verify.pem"
910
}

e2e/tests/binds/get.bats

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,5 +31,6 @@ load 'utils/_helpers'
3131
if haproxy_version_ge "2.5"
3232
then
3333
assert_equal "all" "$(get_json_path "$BODY" ".data.thread")"
34+
assert_equal "$(get_json_path "$BODY" '.data.ca_verify_file')" "/certs/ca-verify.pem"
3435
fi
3536
}

0 commit comments

Comments
 (0)