Skip to content

Commit a63ec4e

Browse files
committed
netdata: Really use usefixtures("host_with_netdata")
Using mark.usefixtures("host_with_netdata") for the whole class is redundant with function parameter 'host_with_netdata'. Using 'host' as function parameter is enough. Signed-off-by: Thierry Escande <[email protected]>
1 parent d4923e3 commit a63ec4e

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

tests/packages/netdata/test_netdata.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,11 @@ def __get_headers(host, port, path=None):
2525
return stdout.decode().splitlines()
2626

2727
# Verify the ActiveState for the netdata service
28-
def test_netdata_service(self, host_with_netdata):
29-
host_with_netdata.ssh(['systemctl', 'is-active', 'netdata.service'])
28+
def test_netdata_service(self, host):
29+
host.ssh(['systemctl', 'is-active', 'netdata.service'])
3030

3131
# Netdata configuration should be accessible only from the host
32-
def test_netdata_conf(self, host_with_netdata):
33-
host = host_with_netdata
32+
def test_netdata_conf(self, host):
3433
lines = TestsNetdata.__get_headers(host, 19999, "netdata.conf")
3534
assert lines[0].strip() == "HTTP/1.1 403 Forbidden"
3635

@@ -39,7 +38,6 @@ def test_netdata_conf(self, host_with_netdata):
3938
assert lines[0].strip() == "HTTP/1.1 200 OK"
4039

4140
# Verify the web UI is accessible. i.e. port 19999 is opened
42-
def test_netdata_webui(self, host_with_netdata):
43-
host = host_with_netdata
41+
def test_netdata_webui(self, host):
4442
lines = TestsNetdata.__get_headers(host, 19999)
4543
assert lines[0].strip() == "HTTP/1.1 200 OK"

0 commit comments

Comments
 (0)