Skip to content

Commit 313554d

Browse files
committed
test/case: minor, cleanup
- Drop redundant comments - Drop redundant imports - PEP-8 fixes Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 8b39d3f commit 313554d

File tree

6 files changed

+8
-31
lines changed

6 files changed

+8
-31
lines changed

test/case/ietf_system/hostname/hostname.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ endif::topdoc[]
2626
. Verify new hostname 'h0stn4m3'
2727
. Set hostname to '%h-%m'
2828
. Verify hostname is %h-%m in running configuration
29-
. Verify hostname format in operational, according to format
29+
. Verify hostname format in operational
3030

3131

3232
<<<

test/case/ietf_system/hostname/test.py

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
1111
e.g. ix-01-01-01.
1212
"""
13-
import random
14-
import string
1513
import re
1614
import infamy
1715

@@ -20,33 +18,33 @@
2018
env = infamy.Env()
2119
target = env.attach("target", "mgmt")
2220
tgtssh = env.attach("target", "mgmt", "ssh")
23-
fmt = "%h-%m"
24-
new="h0stn4m3"
21+
FMT = "%h-%m"
22+
NEW = "h0stn4m3"
2523

2624
with test.step("Set hostname to 'h0stn4m3'"):
2725
target.put_config_dict("ietf-system", {
2826
"system": {
29-
"hostname": new,
27+
"hostname": NEW,
3028
}
3129
})
3230

3331
with test.step("Verify new hostname 'h0stn4m3'"):
3432
running = target.get_config_dict("/ietf-system:system")
35-
assert running["system"]["hostname"] == new
33+
assert running["system"]["hostname"] == NEW
3634

3735
with test.step("Set hostname to '%h-%m'"):
3836
target.put_config_dict("ietf-system", {
3937
"system": {
40-
"hostname": fmt,
38+
"hostname": FMT,
4139
}
4240
})
4341

4442
with test.step("Verify hostname is %h-%m in running configuration"):
4543
running = target.get_config_dict("/ietf-system:system")
46-
if running["system"]["hostname"] != fmt:
44+
if running["system"]["hostname"] != FMT:
4745
test.fail()
4846

49-
with test.step("Verify hostname format in operational, according to format"):
47+
with test.step("Verify hostname format in operational"):
5048
cmd = tgtssh.runsh("sed -n s/^DEFAULT_HOSTNAME=//p /etc/os-release")
5149
default = cmd.stdout.rstrip()
5250

test/case/infix_containers/container_basic/test.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
#!/usr/bin/env python3
2-
#
3-
# Verify that a simple web server container can be configured to run
4-
# with host networking, on port 80. Operation is verified using a
5-
# simple GET request for index.html and checking for a key phrase.
6-
#
7-
# The RPC actions: stop + start, and restart are also verified.
8-
#
92
"""
103
Container basic
114

test/case/infix_containers/container_bridge/test.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
#!/usr/bin/env python3
2-
#
3-
# Verify connectivity with a simple web server container from behind a
4-
# docker0 bridge. As an added twist, this test also verifies content
5-
# mounts, i.e., custom index.html from running-config.
6-
#
72
"""
83
Container with bridge network
94

test/case/infix_containers/container_phys/test.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
#!/usr/bin/env python3
2-
#
3-
# Verify connectivity with a simple web server container that's been
4-
# given a physical interface instead of an end of a VETH pair.
5-
#
62
"""
73
Container with physical interface
84
95
Verify connectivity with a simple web server container that's been
106
given a physical interface instead of an end of a VETH pair.
117
"""
12-
import base64
138
import infamy
149
from infamy.util import until, to_binary
1510

test/case/infix_containers/container_veth/test.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
#!/usr/bin/env python3
2-
#
3-
# Verify connectivity with a simple web server container from behind a
4-
# regular bridge, a VETH pair connects the container to the bridge.
5-
#
62
r"""
73
Container with VETH pair
84

0 commit comments

Comments
 (0)