-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
WIP: ci: add e2e tests for challenge
- Loading branch information
Showing
7 changed files
with
81 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,15 @@ jobs: | |
PASSWORD: ctfer | ||
|
||
services: | ||
chall-manager: | ||
image: registry.dev1.ctfer-io.lab/ctferio/chall-manager:ci | ||
ports: | ||
- 9090:9090 | ||
- 8081:8081 | ||
credentials: | ||
username: ${{ secrets.registry_user }} | ||
password: ${{ secrets.registry_pass }} | ||
|
||
mariadb: | ||
image: mariadb:10.7.8 | ||
ports: | ||
|
@@ -25,6 +34,9 @@ jobs: | |
env: | ||
DATABASE_URL: mysql+pymysql://root:ctfer@mariadb/ctfd | ||
|
||
|
||
|
||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 | ||
|
@@ -53,7 +65,7 @@ jobs: | |
url: 'http://ctfd:8000' | ||
appearance_name: CTFer.io | ||
appearance_description: CTFer.io plugin tests | ||
mode: teams | ||
mode: users # TODO add tests with teams | ||
admin_name: ${{ env.NAME }} | ||
admin_email: [email protected] | ||
admin_password: ${{ env.PASSWORD }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
describe('Dynamic IaC Challenge', () => { | ||
|
||
beforeEach(() => { | ||
cy.login(Cypress.env('CTFD_NAME'), Cypress.env('CTFD_PASSWORD')) | ||
}) | ||
|
||
|
||
it('Test all buttons for Users', () => { | ||
let label = "tests-abcdefgh" | ||
cy.create_challenge(label, "1", "Recreate", "timeout", "300", "/home/nicolas/Downloads/demo-deploy.zip") | ||
cy.wait(5000) // wait ctfd to create challenge and redirect to edit sections | ||
cy.visit(`${Cypress.env("CTFD_URL")}/challenges`) | ||
cy.get("button").contains(label).click() | ||
|
||
// launch instance | ||
cy.get('[data-test-id="cm-button-boot"]').click() | ||
|
||
|
||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters