Skip to content

Commit 16ceeaa

Browse files
committed
remove db refresh every test
1 parent 78b2038 commit 16ceeaa

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ jobs:
8383
python-version: ${{ matrix.python-version }}
8484

8585
- name: Checkout server-api and patch Docker path
86-
# if: matrix.os == 'Linux'
8786
shell: bash
8887
run: |
8988
git clone --depth 1 https://github.com/openml/server-api.git server-api

tests/conftest.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -323,14 +323,6 @@ def openml_docker_stack():
323323

324324
subprocess.run(["docker", "compose", "down", "-v"], check=True)
325325

326-
@pytest.fixture(scope="function", autouse=True)
327-
def reset_db_state():
328-
# if sys.platform == "win32":
329-
# yield
330-
# return
331-
subprocess.run(["docker", "compose", "restart", "database"], check=True)
332-
subprocess.run(["docker", "compose", "up", "database-setup"], check=True)
333-
334326
@pytest.fixture
335327
def static_cache_dir():
336328
return Path(__file__).parent / "files"

tests/test_1.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,10 @@
33

44
# Requesting the 'openml_docker_stack' fixture forces it to run!
55
def test_can_connect_to_local_docker(openml_docker_stack):
6-
print("\n🐳 Docker Stack is UP! Checking connection...")
76

87
# Try to talk to the V2 API we just built
9-
response = requests.get("http://localhost:9001/api/v2")
8+
response = requests.get("http://localhost:9001/docs")
109

1110
# If we get a 200 OK or 404 (Not Found), the server is alive.
1211
# If it fails, this line will crash the test.
13-
assert response.status_code in [200, 404]
14-
print("✅ Successfully connected to Local V2 API on port 9001")
12+
assert response.status_code in [200]

0 commit comments

Comments
 (0)