Skip to content

Commit 1e20778

Browse files
committed
[#1350] Fix system test
1 parent 42819ff commit 1e20778

File tree

8 files changed

+69
-4
lines changed

8 files changed

+69
-4
lines changed
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
3+
"parameters": {
4+
"high-availability": [
5+
{
6+
<?include "/etc/kea/ha-multi-threading.json"?>
7+
"this-server-name": "server1",
8+
"mode": "hot-standby",
9+
"heartbeat-delay": 10000,
10+
"max-response-delay": 20000,
11+
"max-ack-delay": 5000,
12+
"max-unacked-clients": 3,
13+
"peers": [
14+
{
15+
"name": "server1",
16+
"url": "http://172.42.42.100:8000",
17+
"role": "primary",
18+
"auto-failover": true
19+
},
20+
{
21+
"name": "server2",
22+
"url": "http://172.42.42.101:8000",
23+
"role": "standby",
24+
"auto-failover": true
25+
}
26+
]
27+
}
28+
]
29+
}
30+
},
+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
3+
"parameters": {
4+
"high-availability": [
5+
{
6+
<?include "/etc/kea/ha-multi-threading.json"?>
7+
"this-server-name": "server2",
8+
"mode": "hot-standby",
9+
"heartbeat-delay": 10000,
10+
"max-response-delay": 20000,
11+
"max-ack-delay": 5000,
12+
"max-unacked-clients": 3,
13+
"peers": [
14+
{
15+
"name": "server1",
16+
"url": "http://172.42.42.100:8000",
17+
"role": "primary",
18+
"auto-failover": true
19+
},
20+
{
21+
"name": "server2",
22+
"url": "http://172.42.42.101:8000",
23+
"role": "standby",
24+
"auto-failover": true
25+
}
26+
]
27+
}
28+
]
29+
}
30+
},

tests/system/docker-compose.yaml

+8-4
Original file line numberDiff line numberDiff line change
@@ -245,8 +245,8 @@ services:
245245
extends: agent-kea
246246
hostname: agent-kea-ha1
247247
volumes:
248-
- $PWD/tests/system/config/kea-ha1/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
249-
- $PWD/tests/system/config/kea-ha1/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
248+
- $PWD/tests/system/config/kea-ha1/hook-ha.json:/etc/kea/hook-ha-dhcp4.json
249+
- $PWD/tests/system/config/kea-ha1/hook-ha.json:/etc/kea/hook-ha-dhcp6.json
250250

251251
agent-kea-ha1-only-top-mt:
252252
extends: agent-kea-ha1
@@ -257,6 +257,8 @@ services:
257257
extends: agent-kea-ha1-only-top-mt
258258
volumes:
259259
- $PWD/tests/system/config/kea-multi-threading/ha-multi-threading.json:/etc/kea/ha-multi-threading.json
260+
- $PWD/tests/system/config/kea-multi-threading/ha1/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
261+
- $PWD/tests/system/config/kea-multi-threading/ha1/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
260262

261263
agent-kea-ha2:
262264
extends: agent-kea
@@ -286,8 +288,8 @@ services:
286288
ipv6_address: 3001:db8:1:42::101
287289
priority: 400
288290
volumes:
289-
- $PWD/tests/system/config/kea-ha2/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
290-
- $PWD/tests/system/config/kea-ha2/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
291+
- $PWD/tests/system/config/kea-ha2/hook-ha.json:/etc/kea/hook-ha-dhcp4.json
292+
- $PWD/tests/system/config/kea-ha2/hook-ha.json:/etc/kea/hook-ha-dhcp6.json
291293

292294
agent-kea-ha2-only-top-mt:
293295
extends: agent-kea-ha2
@@ -298,6 +300,8 @@ services:
298300
extends: agent-kea-ha2-only-top-mt
299301
volumes:
300302
- $PWD/tests/system/config/kea-multi-threading/ha-multi-threading.json:/etc/kea/ha-multi-threading.json
303+
- $PWD/tests/system/config/kea-multi-threading/ha2/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
304+
- $PWD/tests/system/config/kea-multi-threading/ha2/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
301305

302306
agent-bind9:
303307
restart: always

tests/system/tests/test_config_review.py

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def test_get_ha_pair_mt_config_review_reports(server_service: Server, ha_pair_se
9292
server_service.log_in_as_admin()
9393
server_service.authorize_all_machines()
9494
states = server_service.wait_for_next_machine_states()
95+
server_service.wait_for_ha_ready()
9596

9697
assert len(states) == 2
9798

0 commit comments

Comments
 (0)