Skip to content

Commit

Permalink
tmp
Browse files Browse the repository at this point in the history
  • Loading branch information
chaen committed Jun 12, 2023
1 parent 4e953d4 commit 3b727d7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions tests/Integration/Resources/Storage/Test_Resources_Echo.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# Name of the storage element that has to be tested
gLogger.setLevel("DEBUG")

STORAGE_NAME = "RAL-ECHO"
STORAGE_NAME = "RAL-USER"
# Size in bytes of the file we want to produce
FILE_SIZE = 5 * 1024 # 5kB
# base path on the storage where the test files/folders will be created
Expand Down Expand Up @@ -136,7 +136,7 @@ def setuptest(request):
with open(os.path.join(workPath, fn), "w") as f:
f.write(_mul(fn))

se = StorageElement(STORAGE_NAME)
se = StorageElement(STORAGE_NAME, protocolSections="XRootConfig")

putDir = {
os.path.join(DESTINATION_PATH, "Workflow/FolderA"): os.path.join(local_path, "Workflow/FolderA"),
Expand Down Expand Up @@ -205,7 +205,7 @@ def teardown():
# print 'in test hello2 %s %s'%(setuptest)


@pytest.mark.order1
@pytest.mark.run(order=1)
def test_uploadDirectory_shouldFail(setuptest):
"""uploading directories is not possible with Echo"""
res = se.putDirectory(putDir)
Expand All @@ -224,31 +224,31 @@ def test_uploadDirectory_shouldFail(setuptest):
assert res["Value"]["Successful"][fn] is False


@pytest.mark.order2
@pytest.mark.run(order=2)
def test_listDirectory_shouldFail(setuptest):
"""Listing directory should fail"""
res = se.listDirectory(listDir)
for dn in listDir:
assert dn in res["Value"]["Failed"], res


@pytest.mark.order3
@pytest.mark.run(order=3)
def test_createDirectory(setuptest):
"""Echo is nice enough to tell us that it is a success..."""
res = se.createDirectory(createDir)
for dn in createDir:
assert dn in res["Value"]["Successful"], res


@pytest.mark.order4
@pytest.mark.run(order=4)
def test_putFile(setuptest):
"""Copy a file"""
res = se.putFile(putFile)
assert res["OK"], res
# time.sleep(0.2)


@pytest.mark.order5
@pytest.mark.run(order=5)
def test_isFile(setuptest):
"""Test whether an LFN is a file"""
res = se.isFile(isFile)
Expand All @@ -257,7 +257,7 @@ def test_isFile(setuptest):
assert res["Value"]["Successful"][lfn], res


@pytest.mark.order6
@pytest.mark.run(order=6)
def test_getFileMetadata(setuptest):
"""Get the metadata of previously uploaded files"""
res = se.getFileMetadata(isFile)
Expand All @@ -272,7 +272,7 @@ def test_getFileMetadata(setuptest):
assert res[lfn]["Size"] == fileSizes[lfn]


@pytest.mark.order7
@pytest.mark.run(order=7)
def test_getDirectory_shouldFail(setuptest):
"""Get directory cannot work on Echo"""

Expand All @@ -281,7 +281,7 @@ def test_getDirectory_shouldFail(setuptest):
assert dn in res["Value"]["Failed"], res


@pytest.mark.order8
@pytest.mark.run(order=8)
def test_removeFile(setuptest):
"""Remove files"""
res = se.removeFile(removeFile)
Expand All @@ -291,7 +291,7 @@ def test_removeFile(setuptest):
assert res["Value"]["Successful"][removeFile[0]] is False


@pytest.mark.order9
@pytest.mark.run(order=9)
def test_removeNonExistingFile(setuptest):
"""remove non existing file"""
res = se.removeFile(removeFile)
Expand Down

0 comments on commit 3b727d7

Please sign in to comment.