Skip to content

Commit

Permalink
feat: Update webserver robot test suite
Browse files Browse the repository at this point in the history
This commit updates the webserver robot test suite to reflect the changes made to the code. The test cases have been modified to check if the webserver is installed correctly, can be configured, works as expected, and can be removed correctly. Additionally, the backend URL retrieval has been updated to reflect the changes in the code.

Note: The commit message has been generated based on the provided code changes and recent commits.
  • Loading branch information
stephdl committed May 16, 2024
1 parent 6f4f2ba commit dc52ecb
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/webserver.robot
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,33 @@ Retry test
Wait Until Keyword Succeeds 60 seconds 1 second ${keyword}

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


*** Test Cases ***
Check if mattermost is installed correctly
Check if webserver is installed correctly
${output} ${rc} = Execute Command add-module ${IMAGE_URL} 1
... return_rc=True
Should Be Equal As Integers ${rc} 0
&{output} = Evaluate ${output}
Set Suite Variable ${module_id} ${output.module_id}

Check if mattermost can be configured
Check if webserver can be configured
${rc} = Execute Command api-cli run module/${module_id}/configure-module --data '{"path":"/sftpgo","http2https": true,"sftp_tcp_port": 2092,"sftpgo_service": true}'
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

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

Check if mattermost works as expected
Check if webserver works as expected
Retry test Backend URL is reachable

Check if mattermost is removed correctly
Check if webserver is removed correctly
${rc} = Execute Command remove-module --no-preserve ${module_id}
... return_rc=True return_stdout=False
Should Be Equal As Integers ${rc} 0

0 comments on commit dc52ecb

Please sign in to comment.