Skip to content

Commit b55a464

Browse files
committed
Mark deployment tests that require access to k8 api
1 parent a4914ea commit b55a464

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/test_aws_integration.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ jobs:
112112
KEYCLOAK_PASSWORD: ${{ env.TEST_PASSWORD }}
113113
NEBARI_HOSTNAME: ${{ steps.init.outputs.domain }}
114114
run: |
115-
pytest tests/tests_deployment/ -v
115+
pytest tests/tests_deployment/ -v -W ignore::DeprecationWarning -m "not requires_kubeconfig"
116116
117117
### USER-JOURNEY TESTS
118118
- uses: actions/setup-node@v4

pytest.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ addopts =
99
markers =
1010
gpu: test gpu working properly
1111
preemptible: test preemptible instances
12+
requires_kubeconfig: test that requires to interact with the kubernetes api
1213
testpaths =
1314
tests
1415
xfail_strict = True

tests/tests_deployment/test_loki_deployment.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
}
2727

2828

29+
@pytest.mark.requires_kubeconfig
2930
@pytest.fixture(scope="module")
3031
def port_forward_fixture(request):
3132
"""Pytest fixture to port forward loki backend pod to make it accessible
@@ -41,6 +42,7 @@ def port_forward(labels, port):
4142
return pytest.mark.parametrize("port_forward_fixture", [params], indirect=True)
4243

4344

45+
@pytest.mark.requires_kubeconfig
4446
@pytest.mark.parametrize(
4547
"endpoint_path",
4648
(
@@ -67,6 +69,7 @@ def test_loki_endpoint(endpoint_path: str, port_forward_fixture: V1Pod):
6769
response.close()
6870

6971

72+
@pytest.mark.requires_kubeconfig
7073
@port_forward(labels=MINIO_POD_LABELS, port=MINIO_PORT)
7174
def test_minio_accessible(port_forward_fixture: V1Pod):
7275
"""This will hit liveness endpoint of minio API and verify that we
@@ -82,6 +85,7 @@ def test_minio_accessible(port_forward_fixture: V1Pod):
8285
response.close()
8386

8487

88+
@pytest.mark.requires_kubeconfig
8589
@port_forward(labels=LOKI_GATEWAY_POD_LABELS, port=LOKI_GATEWAY_PORT)
8690
def test_loki_gateway(port_forward_fixture: V1Pod):
8791
"""This will hit an endpoint of loki gateway API and verify that we
@@ -99,6 +103,7 @@ def test_loki_gateway(port_forward_fixture: V1Pod):
99103
response.close()
100104

101105

106+
@pytest.mark.requires_kubeconfig
102107
@port_forward(labels=LOKI_GATEWAY_POD_LABELS, port=LOKI_GATEWAY_PORT)
103108
def test_loki_gateway_fetch_logs(port_forward_fixture: V1Pod):
104109
"""This will hit an endpoint of loki gateway API to fetch some logs

0 commit comments

Comments
 (0)