Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
8 changes: 6 additions & 2 deletions tests/unittests/test_datasource/test_opennebula.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
import pwd
import unittest

import pytest


TEST_VARS = {
'VAR1': 'single',
Expand Down Expand Up @@ -914,12 +916,14 @@ def test_multiple_nics(self):
self.assertEqual(expected, net.gen_conf())


class TestParseShellConfig(unittest.TestCase):
class TestParseShellConfig:

@pytest.mark.parametrize('disable_subp_usage', ['bash'], indirect=True)
def test_no_seconds(self):
cfg = '\n'.join(["foo=bar", "SECONDS=2", "xx=foo"])
# we could test 'sleep 2', but that would make the test run slower.
ret = ds.parse_shell_config(cfg)
self.assertEqual(ret, {"foo": "bar", "xx": "foo"})
assert ret == {"foo": "bar", "xx": "foo"}


def populate_context_dir(path, variables):
Expand Down
1 change: 1 addition & 0 deletions tests/unittests/test_render_cloudcfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"netbsd", "openbsd", "rhel", "suse", "ubuntu", "unknown"]


@pytest.mark.parametrize('disable_subp_usage', [sys.executable], indirect=True)
class TestRenderCloudCfg:

cmd = [sys.executable, os.path.realpath('tools/render-cloudcfg')]
Expand Down