Blob Blame History Raw
From 10de8c40d2f2964ce0c4f643a143c59e5fa11f94 Mon Sep 17 00:00:00 2001
From: Ken Dreyer <kdreyer@redhat.com>
Date: Fri, 11 Oct 2019 09:42:22 -0600
Subject: [PATCH 4/5] tests: add container-build --isolated test

Verify the behavior of the container-build "--isolated" option.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
---
 tests/test_cli.py | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/tests/test_cli.py b/tests/test_cli.py
index 35b37d6..fa18647 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -271,6 +271,36 @@ class TestContainerBuildWithKoji(CliTestCase):
             flatpak=False
         )
 
+    def test_isolated(self):
+        cli_cmd = ['rpkg', '--path', self.cloned_repo_path, 'container-build',
+                   '--isolated', '--build-release', '99']
+
+        with patch('sys.argv', new=cli_cmd):
+            cli = self.new_cli()
+            cli.container_build_koji()
+
+        self.mock_container_build_koji.assert_called_once_with(
+            False,
+            opts={
+                'scratch': False,
+                'quiet': False,
+                'release': '99',
+                'isolated': True,
+                'yum_repourls': None,
+                'git_branch': 'eng-rhel-7',
+                'arches': None,
+                'signing_intent': None,
+                'compose_ids': None,
+                'skip_build': False
+            },
+            kojiconfig=None,
+            kojiprofile='koji',
+            build_client=utils.build_client,
+            koji_task_watcher=koji_cli.lib.watch_tasks,
+            nowait=False,
+            flatpak=False
+        )
+
     def test_using_deprecated_kojiconfig(self):
         """test_build_using_deprecated_kojiconfig
 
-- 
2.21.0