summaryrefslogtreecommitdiffstats
path: root/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py
diff options
context:
space:
mode:
Diffstat (limited to 'roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py')
-rwxr-xr-xroles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py b/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py
index 342da961b..08fc9f6df 100755
--- a/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py
+++ b/roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py
@@ -149,18 +149,18 @@ metadata:
mock_cmd.assert_has_calls([
mock.call(['oc', '-n', 'default', 'get', 'sa', 'builder', '-o', 'json'], None),
mock.call(['oc', '-n', 'default', 'get', 'sa', 'builder', '-o', 'json'], None),
- mock.call(['oc', '-n', 'default', 'replace', '-f', '/tmp/builder'], None),
+ mock.call(['oc', '-n', 'default', 'replace', '-f', mock.ANY], None),
mock.call(['oc', '-n', 'default', 'get', 'sa', 'builder', '-o', 'json'], None)
])
mock_write.assert_has_calls([
- mock.call('/tmp/builder', builder_yaml_file)
+ mock.call(mock.ANY, builder_yaml_file)
])
@mock.patch('oc_serviceaccount_secret.Yedit._write')
@mock.patch('oc_serviceaccount_secret.OCServiceAccountSecret._run')
def test_removing_a_secret_to_a_serviceaccount(self, mock_cmd, mock_write):
- ''' Testing adding a secret to a service account '''
+ ''' Testing removing a secret to a service account '''
# Arrange
@@ -241,11 +241,11 @@ metadata:
mock_cmd.assert_has_calls([
mock.call(['oc', '-n', 'default', 'get', 'sa', 'builder', '-o', 'json'], None),
mock.call(['oc', '-n', 'default', 'get', 'sa', 'builder', '-o', 'json'], None),
- mock.call(['oc', '-n', 'default', 'replace', '-f', '/tmp/builder'], None),
+ mock.call(['oc', '-n', 'default', 'replace', '-f', mock.ANY], None),
])
mock_write.assert_has_calls([
- mock.call('/tmp/builder', builder_yaml_file)
+ mock.call(mock.ANY, builder_yaml_file)
])
def tearDown(self):