Skip to content

Commit

Permalink
chore: Create directory for user with podman exec
Browse files Browse the repository at this point in the history
  • Loading branch information
stephdl committed May 16, 2024
1 parent d4e7225 commit be70076
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions imageroot/actions/create-vhost/10base
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ headers = {

conn.request("POST", "/api/v2/users", payload, headers)

## create the directory for the user with podman exec
subprocess.run(["podman", "exec", "sftpgo", "mkdir", "/srv/sftpgo/data/"+str(NextFpmPort)])
12 changes: 12 additions & 0 deletions tests/webserver.robot
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Backend URL is reachable
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

VirtualHost URL is reachable
${rc} = Execute Command curl -f ${backend_url}
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

*** Test Cases ***
Check if webserver is installed correctly
Expand Down Expand Up @@ -44,6 +48,14 @@ Check if vhost can be updated
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

Retrieve virtualhost backend URL
# Assuming the test is running on a single node cluster
${response} = Run task module/traefik1/get-route {"instance":"${module_id}-foo.com"}
Set Suite Variable ${backend_url} ${response['url']}

Check if virtualhost works as expected
Retry test VirtualHost URL is reachable

Check if vhost can be destroyed
${rc} = Execute Command api-cli run module/${module_id}/destroy-vhost --data '{"ServerNames": ["foo.com","john.com"],"port": 9001}'
... return_rc=True return_stdout=False
Expand Down

0 comments on commit be70076

Please sign in to comment.