test: minor cleanup, whitespace only

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-01-04 12:28:28 +01:00
parent 39b9c7a065
commit 113b43ecae
2 changed files with 26 additions and 31 deletions
+17 -22
View File
@@ -25,28 +25,23 @@ with infamy.Test() as test:
target.put_config_dict("ietf-interfaces", {
"interfaces": {
"interface": [
{
"name": "br0",
"type": "infix-if-type:bridge",
"enabled": True,
"ipv4": {
"address": [
{
"ip": "10.0.0.2",
"prefix-length": 24,
}
]
}
},
{
"name": tport,
"enabled": True,
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
},
]
"interface": [{
"name": "br0",
"type": "infix-if-type:bridge",
"enabled": True,
"ipv4": {
"address": [{
"ip": "10.0.0.2",
"prefix-length": 24,
}]
}
}, {
"name": tport,
"enabled": True,
"infix-interfaces:bridge-port": {
"bridge": "br0"
}
}]
}
})
+9 -9
View File
@@ -9,12 +9,13 @@ import infamy
import infamy.ntp_server as ntp_server
import infamy.ntp as ntp
import infamy.util as util
def config_target(dut, data1, data2, data3):
dut.put_config_dicts({
"ietf-interfaces": {
"interfaces": {
"interface": [
{
"interface": [{
"name": data1,
"enabled": True,
"ipv4": {
@@ -23,8 +24,7 @@ def config_target(dut, data1, data2, data3):
"prefix-length": 24
}]
}
},
{
}, {
"name": data2,
"enabled": True,
"ipv4": {
@@ -33,8 +33,7 @@ def config_target(dut, data1, data2, data3):
"prefix-length": 24
}]
}
},
{
}, {
"name": data3,
"enabled": True,
"ipv4": {
@@ -57,13 +56,13 @@ def config_target(dut, data1, data2, data3):
"address": "192.168.1.1"
},
"iburst": True
},{
}, {
"name": "Server2",
"udp": {
"address": "192.168.2.1"
},
"iburst": True
},{
}, {
"name": "Server3",
"udp": {
"address": "192.168.3.1"
@@ -75,6 +74,7 @@ def config_target(dut, data1, data2, data3):
}
})
with infamy.Test() as test:
with test.step("Set up topology and attach to target DUT"):
env = infamy.Env()
@@ -104,6 +104,6 @@ with infamy.Test() as test:
with test.step("Verify one source is in 'selected' state on 'target'"):
util.until(lambda: ntp.any_source_selected(target), attempts=200)
with test.step("Verify three sources exist in NTP client on 'target'"):
assert(ntp.number_of_sources(target) == 3)
assert ntp.number_of_sources(target) == 3
test.succeed()