Skip to content

Commit 487ed10

Browse files
committed
Tweak tests
1 parent a84e9ef commit 487ed10

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

.github/workflows/e2e.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on: [pull_request]
55
jobs:
66
unittest:
77
runs-on: ubuntu-latest
8+
env:
9+
YETI_ENDPOINT: 'http://localhost:80'
810
strategy:
911
matrix:
1012
os: [ubuntu-latest]
@@ -21,6 +23,8 @@ jobs:
2123
cache: poetry
2224
- name: Install a Yeti prod deployment
2325
run: git clone https://github.com/yeti-platform/yeti-docker && cd yeti-docker/prod && ./init.sh
26+
run: sleep 10
27+
run: export YETI_API_KEY=$(docker compose run --rm api create-user test test --admin | awk -F'test:' '{print $2}')
2428
- name: Install Python dependencies
2529
run: poetry install --no-root
2630
- name: e2e testing

.github/workflows/unittests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ jobs:
2323
run: poetry install --no-root
2424
- name: Test with unittest
2525
run: |
26-
poetry run python -m unittest discover -s tests/ -p '*.py'
26+
poetry run python -m unittest tests/api.py

tests/e2e.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
from yeti import errors
99
from yeti.api import YetiApi
1010

11-
os.environ["YETI_ENDPOINT"] = "http://dev-frontend-1:3000"
12-
os.environ["YETI_API_KEY"] = (
13-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzdGluZyIsInN1YiI6InlldGkiLCJzY29wZXMiOlsiYWxsIl0sImNyZWF0ZWQiOiIyMDI1LTAzLTExVDIzOjQ1OjU5Ljg3OTQ1OVoiLCJleHAiOm51bGwsImxhc3RfdXNlZCI6bnVsbCwiZW5hYmxlZCI6dHJ1ZSwiZXhwaXJlZCI6ZmFsc2V9.yTidlJ5r8mURLpV9ER3APpO5MlPoG30Z0PqtMLbY1Vg"
14-
)
11+
# os.environ["YETI_ENDPOINT"] = "http://dev-frontend-1:3000"
12+
# os.environ["YETI_API_KEY"] = (
13+
# "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzdGluZyIsInN1YiI6InlldGkiLCJzY29wZXMiOlsiYWxsIl0sImNyZWF0ZWQiOiIyMDI1LTAzLTExVDIzOjQ1OjU5Ljg3OTQ1OVoiLCJleHAiOm51bGwsImxhc3RfdXNlZCI6bnVsbCwiZW5hYmxlZCI6dHJ1ZSwiZXhwaXJlZCI6ZmFsc2V9.yTidlJ5r8mURLpV9ER3APpO5MlPoG30Z0PqtMLbY1Vg"
14+
# )
1515

1616

1717
class YetiEndToEndTest(unittest.TestCase):

0 commit comments

Comments
 (0)