diff options
author | Kenny Woodson <kwoodson@redhat.com> | 2017-02-08 09:19:36 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-02-08 09:19:36 -0500 |
commit | 1321f28eb14f03a04ed4f3661629ca001ee83502 (patch) | |
tree | 1ad83e300ec589f9d4888293d2f62dc2c287af04 /roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py | |
parent | 5a933ed4b33131423b2f349eb0bc33ead99ec360 (diff) | |
parent | aa97c28b6a9b468498fffe565d314b07141f163b (diff) | |
download | openshift-1321f28eb14f03a04ed4f3661629ca001ee83502.tar.gz openshift-1321f28eb14f03a04ed4f3661629ca001ee83502.tar.bz2 openshift-1321f28eb14f03a04ed4f3661629ca001ee83502.tar.xz openshift-1321f28eb14f03a04ed4f3661629ca001ee83502.zip |
Merge pull request #3286 from twiest/fix_openshift_modules_temp_files
Changed lib_openshift to use real temporary files.
Diffstat (limited to 'roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py')
-rwxr-xr-x | roles/lib_openshift/src/test/unit/oc_serviceaccount_secret.py | 10 |
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): |