Skip to content

Commit

Permalink
[#1350] Fix system test
Browse files Browse the repository at this point in the history
  • Loading branch information
fivitti committed Jul 8, 2024
1 parent 42819ff commit 1e20778
Show file tree
Hide file tree
Showing 8 changed files with 69 additions and 4 deletions.
30 changes: 30 additions & 0 deletions tests/system/config/kea-ha1/hook-ha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [
{
<?include "/etc/kea/ha-multi-threading.json"?>
"this-server-name": "server1",
"mode": "hot-standby",
"heartbeat-delay": 10000,
"max-response-delay": 20000,
"max-ack-delay": 5000,
"max-unacked-clients": 3,
"peers": [
{
"name": "server1",
"url": "http://172.42.42.100:8000",
"role": "primary",
"auto-failover": true
},
{
"name": "server2",
"url": "http://172.42.42.101:8000",
"role": "standby",
"auto-failover": true
}
]
}
]
}
},
30 changes: 30 additions & 0 deletions tests/system/config/kea-ha2/hook-ha.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"library": "/usr/lib/x86_64-linux-gnu/kea/hooks/libdhcp_ha.so",
"parameters": {
"high-availability": [
{
<?include "/etc/kea/ha-multi-threading.json"?>
"this-server-name": "server2",
"mode": "hot-standby",
"heartbeat-delay": 10000,
"max-response-delay": 20000,
"max-ack-delay": 5000,
"max-unacked-clients": 3,
"peers": [
{
"name": "server1",
"url": "http://172.42.42.100:8000",
"role": "primary",
"auto-failover": true
},
{
"name": "server2",
"url": "http://172.42.42.101:8000",
"role": "standby",
"auto-failover": true
}
]
}
]
}
},
12 changes: 8 additions & 4 deletions tests/system/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@ services:
extends: agent-kea
hostname: agent-kea-ha1
volumes:
- $PWD/tests/system/config/kea-ha1/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-ha1/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
- $PWD/tests/system/config/kea-ha1/hook-ha.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-ha1/hook-ha.json:/etc/kea/hook-ha-dhcp6.json

agent-kea-ha1-only-top-mt:
extends: agent-kea-ha1
Expand All @@ -257,6 +257,8 @@ services:
extends: agent-kea-ha1-only-top-mt
volumes:
- $PWD/tests/system/config/kea-multi-threading/ha-multi-threading.json:/etc/kea/ha-multi-threading.json
- $PWD/tests/system/config/kea-multi-threading/ha1/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-multi-threading/ha1/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json

agent-kea-ha2:
extends: agent-kea
Expand Down Expand Up @@ -286,8 +288,8 @@ services:
ipv6_address: 3001:db8:1:42::101
priority: 400
volumes:
- $PWD/tests/system/config/kea-ha2/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-ha2/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json
- $PWD/tests/system/config/kea-ha2/hook-ha.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-ha2/hook-ha.json:/etc/kea/hook-ha-dhcp6.json

agent-kea-ha2-only-top-mt:
extends: agent-kea-ha2
Expand All @@ -298,6 +300,8 @@ services:
extends: agent-kea-ha2-only-top-mt
volumes:
- $PWD/tests/system/config/kea-multi-threading/ha-multi-threading.json:/etc/kea/ha-multi-threading.json
- $PWD/tests/system/config/kea-multi-threading/ha2/hook-ha-dhcp4.json:/etc/kea/hook-ha-dhcp4.json
- $PWD/tests/system/config/kea-multi-threading/ha2/hook-ha-dhcp6.json:/etc/kea/hook-ha-dhcp6.json

agent-bind9:
restart: always
Expand Down
1 change: 1 addition & 0 deletions tests/system/tests/test_config_review.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def test_get_ha_pair_mt_config_review_reports(server_service: Server, ha_pair_se
server_service.log_in_as_admin()
server_service.authorize_all_machines()
states = server_service.wait_for_next_machine_states()
server_service.wait_for_ha_ready()

assert len(states) == 2

Expand Down

0 comments on commit 1e20778

Please sign in to comment.