summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/test/test_basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/logicalfile/test/test_basic.py')
-rw-r--r--src/logicalfile/test/test_basic.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/logicalfile/test/test_basic.py b/src/logicalfile/test/test_basic.py
index 3047f9e..b5871fb 100644
--- a/src/logicalfile/test/test_basic.py
+++ b/src/logicalfile/test/test_basic.py
@@ -460,6 +460,27 @@ class TestLogicalFile(LogicalFileTestBase):
rmdir,
'/cant/remove/me')
+ def test_create_symlink(self):
+ def create_symlink(target, path):
+ cop = self.cop.copy()
+ cop['Name'] = path
+ cop['TargetFile'] = path
+ inst = pywbem.CIMInstance('LMI_SymbolicLink', cop.keybindings)
+ self.wbemconnection.CreateInstance(inst)
+
+ target = self.files['data']['path']
+ name = self.testdir + '/target-symlink'
+
+ try:
+ create_symlink(target, name)
+ except pywbem.CIMError as pe:
+ self.fail(pe[1])
+
+ self.assertRaises(pywbem.CIMError,
+ create_symlink,
+ target,
+ name)
+
# for now, this test just checks if FSName, FSCreationClassName,
# CreationClassName and LFCreationClassName are properly ignored; empty
# strings are used, since they should represent "ignored" pretty well