diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0434a4f..2ef65b3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -39,6 +39,8 @@ jobs: image: dvrbanec/repo:latest ports: - 4242 + - 8081 + - 8085 services: keycloak: image: dvrbanec/keycloak-dev:latest @@ -62,4 +64,5 @@ jobs: python3 keycloak-setup/keycloak-config.py oidc-gen --flow password -f keycloak-setup/client_config.json --op-username test-user1 --op-password secret1 --prompt none --pw-file keycloak_setup/pw-file test-user1 oidc-gen --flow password -f keycloak-setup/client_config.json --op-username test-user2 --op-password secret2 --prompt none --pw-file keycloak_setup/pw-file test-user2 - # robot robot/storm-webdav-tests.robot \ No newline at end of file + sudo /usr/share/teapot/webdav-automation.sh test-user1 8085 + robot robot/storm-webdav-tests.robot \ No newline at end of file diff --git a/robot/storm-webdav-tests.robot b/robot/storm-webdav-tests.robot index 9fca27a..1661f4a 100644 --- a/robot/storm-webdav-tests.robot +++ b/robot/storm-webdav-tests.robot @@ -1,6 +1,6 @@ *** Settings *** Library RequestsLibrary -Variables /home/dijana/teapot/robot/variables.py +Variables robot/variables.py *** Test Cases *** diff --git a/robot/test_file b/robot/test_file new file mode 100644 index 0000000..ec1b959 Binary files /dev/null and b/robot/test_file differ diff --git a/robot/variables.py b/robot/variables.py index 5f1a03d..531d35a 100644 --- a/robot/variables.py +++ b/robot/variables.py @@ -1,15 +1,13 @@ import subprocess -PORT= '8085' -PORT_MAIN='8081' -HOST='131.169.234.115' -STORM_URL="https://"+HOST+":"+PORT -MAIN_URL="https://"+HOST+":"+PORT_MAIN -TOKEN1=subprocess.check_output("oidc-token test-kc1", shell=True) -TOKEN2=subprocess.check_output("oidc-token test-kc2", shell=True) -TOKEN3=subprocess.check_output("oidc-token test-kc3", shell=True) -HEADER1={"Authorization": ("Bearer "+str(TOKEN1, 'ascii')).strip("\n")} -HEADER2={"Authorization": ("Bearer "+str(TOKEN2, 'ascii')).strip("\n")} -HEADER3={"Authorization": ("Bearer "+str(TOKEN3, 'ascii')).strip("\n")} -HEADER4={"Authorization": "Bearer NOT_A_TOKEN"} -DATA='/home/dijana/TestFile1' +PORT = "8085" +PORT_MAIN = "8081" +HOST = "localhost" +STORM_URL = "https://" + HOST + ":" + PORT +MAIN_URL = "https://" + HOST + ":" + PORT_MAIN +TOKEN1 = subprocess.check_output("oidc-token test-user1", shell=True) +TOKEN2 = subprocess.check_output("oidc-token test-user2", shell=True) +HEADER1 = {"Authorization": ("Bearer " + str(TOKEN1, "ascii")).strip("\n")} +HEADER2 = {"Authorization": ("Bearer " + str(TOKEN2, "ascii")).strip("\n")} +HEADER4 = {"Authorization": "Bearer NOT_A_TOKEN"} +DATA = "robot/test_file"