diff options
author | Abhijeet Kasurde <akasurde@redhat.com> | 2023-05-09 08:22:41 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-09 11:22:41 -0400 |
commit | 7ef8e0e102388ae422b214eccffc381deeecadf1 (patch) | |
tree | 250423085d40fa8d9541bbbee4d750e363c19287 | |
parent | 4b0d014d5840333457bd118c5fae5cf58325a877 (diff) | |
download | ansible-7ef8e0e102388ae422b214eccffc381deeecadf1.tar.gz |
Remove unnecessary test case in vault editor (#80741)
* Remove test_real_path_symlink test case
* Check if we do not get `-` return when some value other `-` is passed
Fixes: #80444
Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
-rw-r--r-- | test/units/parsing/vault/test_vault_editor.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/test/units/parsing/vault/test_vault_editor.py b/test/units/parsing/vault/test_vault_editor.py index a3bbcf8b17..4e734e065e 100644 --- a/test/units/parsing/vault/test_vault_editor.py +++ b/test/units/parsing/vault/test_vault_editor.py @@ -498,21 +498,9 @@ class TestVaultEditor(unittest.TestCase): res = ve._real_path(filename) self.assertEqual(res, '-') - def test_real_path_dev_null(self): + def test_real_path_not_dash(self): filename = '/dev/null' ve = self._vault_editor() res = ve._real_path(filename) - self.assertEqual(res, '/dev/null') - - def test_real_path_symlink(self): - self._test_dir = os.path.realpath(self._create_test_dir()) - file_path = self._create_file(self._test_dir, 'test_file', content=b'this is a test file') - file_link_path = os.path.join(self._test_dir, 'a_link_to_test_file') - - os.symlink(file_path, file_link_path) - - ve = self._vault_editor() - - res = ve._real_path(file_link_path) - self.assertEqual(res, file_path) + self.assertNotEqual(res, '-') |