Skip to content

Commit

Permalink
First robot test
Browse files Browse the repository at this point in the history
  • Loading branch information
vrbanecd committed Nov 6, 2023
1 parent 508427a commit f214b46
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
image: dvrbanec/repo:latest
ports:
- 4242
- 8081
- 8085
services:
keycloak:
image: dvrbanec/keycloak-dev:latest
Expand All @@ -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
sudo /usr/share/teapot/webdav-automation.sh test-user1 8085
robot robot/storm-webdav-tests.robot
2 changes: 1 addition & 1 deletion robot/storm-webdav-tests.robot
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
*** Settings ***
Library RequestsLibrary
Variables /home/dijana/teapot/robot/variables.py
Variables robot/variables.py


*** Test Cases ***
Expand Down
Binary file added robot/test_file
Binary file not shown.
24 changes: 11 additions & 13 deletions robot/variables.py
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit f214b46

Please sign in to comment.