Skip to content

Commit

Permalink
fix tests on stage
Browse files Browse the repository at this point in the history
  • Loading branch information
ebrehault committed Dec 7, 2023
1 parent 91ad6db commit 4403d4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/stage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: "pip"
cache: 'pip'

- name: Install package
run: make install
Expand All @@ -32,4 +32,4 @@ jobs:
run: make lint

- name: Test
run: BASE_NUCLIA_DOMAIN="stashify.cloud" GA_TESTING_SERVICE_TOKEN="${{ secrets.STAGE_TESTING_SERVICE_TOKEN }}" GA_TESTING_TOKEN="${{ secrets.STAGE_TESTING_TOKEN }}" GA_TESTING_NUA="${{ secrets.STAGE_TESTING_NUA }}" make test
run: USE_NEW_REGIONAL_ENDPOINTS="TRUE" BASE_NUCLIA_DOMAIN="stashify.cloud" GA_TESTING_SERVICE_TOKEN="${{ secrets.STAGE_TESTING_SERVICE_TOKEN }}" GA_TESTING_TOKEN="${{ secrets.STAGE_TESTING_TOKEN }}" GA_TESTING_NUA="${{ secrets.STAGE_TESTING_NUA }}" make test
8 changes: 4 additions & 4 deletions nuclia/tests/test_manage/test_kb.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ def test_add_and_delete_kb(testing_config):
assert True
return
kbs = NucliaKBS()
kb = kbs.add(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG, title="Test KB")
kb = kbs.add(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG, title="Test KB", zone="europe-1")
assert kb["id"] is not None
assert kb["slug"] == NEW_KB_SLUG
assert kb["title"] == "Test KB"
assert kbs.get(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG) is not None
assert kbs.get(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG, zone="europe-1") is not None

kbs.delete(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG)
kbs.delete(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG, zone="europe-1")
with pytest.raises(UserTokenExpired):
kbs.get(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG)
kbs.get(account=TESTING_ACCOUNT_SLUG, slug=NEW_KB_SLUG, zone="europe-1")

0 comments on commit 4403d4b

Please sign in to comment.