Skip to content

Commit

Permalink
test create_dojo_yml in github CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wumingzhilian committed Apr 10, 2024
1 parent aae92c0 commit 0d25d2a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def lfs_dojo(admin_session):
@pytest.fixture(scope="session")
def welcome_dojo(admin_session):
try:
rid = create_dojo("github","pwncollege/welcome-dojo", session=admin_session)
rid = create_dojo("github","HUSTSeclab/welcome-dojo", session=admin_session)
except AssertionError:
rid = "welcome"
make_dojo_official(rid, admin_session)
Expand Down
1 change: 0 additions & 1 deletion test/dojos/simple_award_dojo.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
repository_type: github
id: simple-award
type: public
award:
Expand Down
2 changes: 1 addition & 1 deletion test/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def create_dojo(repository_type,repository, *, session):
return dojo_reference_id

def create_dojo_yml(spec, *, session):
response = session.post(f"{PROTO}://{HOST}/pwncollege_api/v1/dojo/create", json={"spec": spec})
response = session.post(f"{PROTO}://{HOST}/pwncollege_api/v1/dojo/create-spec", json={"spec": spec})
assert response.status_code == 200, f"Expected status code 200, but got {response.status_code} - {response.json()}"
dojo_reference_id = response.json()["dojo"]
return dojo_reference_id
Expand Down

0 comments on commit 0d25d2a

Please sign in to comment.