diff --git a/python/pythontest/TestTools.py b/python/pythontest/TestTools.py index 7a3fc770e2d29bd8d646926b45bface915806fca..ad2dbff9ab5d820a1bec245d7dfd4cd97a62a4e7 100644 --- a/python/pythontest/TestTools.py +++ b/python/pythontest/TestTools.py @@ -3,7 +3,6 @@ import os import sys -#import unittest import subprocess import pipes import pytest @@ -117,11 +116,12 @@ class TestTools(): def test_make_dir(self): assert True + @pytest.mark.msuser def test_success_put_file_to_ecserver(self): - ecuid=os.environ['ECUID']#'km4a' - ecgid=os.environ['ECGID']#'at' + ecuid=os.environ['ECUID'] + ecgid=os.environ['ECGID'] put_file_to_ecserver('TestData/', 'testfile.txt', 'ecgate', ecuid, ecgid) - assert subprocess.call(['ssh', 'km4a@ecaccess.ecmwf.int' , + assert subprocess.call(['ssh', ecuid+'@ecaccess.ecmwf.int' , 'test -e ' + pipes.quote('/home/ms/'+ecgid+'/'+ecuid)]) == 0 diff --git a/python/pythontest/pytest.ini b/python/pythontest/pytest.ini new file mode 100644 index 0000000000000000000000000000000000000000..301a45e2e404f2fd007215f09ca56642c0cf67cb --- /dev/null +++ b/python/pythontest/pytest.ini @@ -0,0 +1,4 @@ +# content of pytest.ini +[pytest] +markers = + memberstate: Test that can be executed only as a member-state user. Password required. \ No newline at end of file