Skip to content

Commit f334bd2

Browse files
committed
Fix for call_plugin not return a bool
Signed-off-by: Damien Thenot <[email protected]>
1 parent d1caf94 commit f334bd2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/xapi_plugins/plugin_netdata/test_netdata.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import pytest
22

3+
from lib.common import strtobool
4+
35
# Requirements:
46
# From --hosts parameter:
57
# - host(A1): first XCP-ng host > 8.2.
@@ -8,7 +10,7 @@
810

911
@pytest.fixture(scope='module')
1012
def host_without_netdata(host):
11-
assert not host.call_plugin('netdata.py', 'is_netdata_installed')
13+
assert not strtobool(host.call_plugin('netdata.py', 'is_netdata_installed'))
1214
yield host
1315

1416
class TestInstall:
@@ -22,7 +24,7 @@ def test_install_netdata(self, host_without_netdata):
2224
"api_key": "dummy_key", "destination": "127.0.0.1:19999"
2325
})
2426

25-
assert host.call_plugin('netdata.py', 'is_netdata_installed')
27+
assert strtobool(host.call_plugin('netdata.py', 'is_netdata_installed'))
2628

2729
host.yum_restore_saved_state()
2830

0 commit comments

Comments
 (0)