Skip to content

Commit

Permalink
Merge pull request #621 from vespa-engine/jobergum/delete-app-after-test
Browse files Browse the repository at this point in the history
  • Loading branch information
kkraune committed Nov 9, 2023
2 parents 70a3fab + 41fc12a commit 268bd79
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion vespa/test_integration_vespa_cloud.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import os
import asyncio
import shutil
import pytest
from requests import HTTPError
import unittest
from cryptography.hazmat.primitives import serialization
from vespa.application import Vespa
Expand Down Expand Up @@ -64,14 +66,16 @@ def test_key_cert_arguments(self):
self.app.get_data(data_id="1").json,
)
self.assertEqual(self.app.get_data(data_id="1").is_successfull(), False)
with pytest.raises(HTTPError):
self.app.get_data(data_id="1",raise_on_not_found=True)


def tearDown(self) -> None:
self.app.delete_all_docs(
content_cluster_name="msmarco_content", schema="msmarco"
)
shutil.rmtree(self.disk_folder, ignore_errors=True)
#self.vespa_cloud.delete()
self.vespa_cloud.delete()


class TestMsmarcoApplication(TestApplicationCommon):
Expand Down
6 changes: 5 additions & 1 deletion vespa/test_integration_vespa_cloud_token.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
import asyncio
import shutil
import unittest
import pytest
from requests import HTTPError
from vespa.application import Vespa
from vespa.package import AuthClient, Parameter
from vespa.deployment import VespaCloud
Expand Down Expand Up @@ -56,14 +58,16 @@ def test_right_endpoint_used_with_token(self):
self.app.get_data(data_id="1").json,
)
self.assertEqual(self.app.get_data(data_id="1").is_successfull(), False)
with pytest.raises(HTTPError):
self.app.get_data(data_id="1",raise_on_not_found=True)


def tearDown(self) -> None:
self.app.delete_all_docs(
content_cluster_name="msmarco_content", schema="msmarco"
)
shutil.rmtree(self.disk_folder, ignore_errors=True)
#self.vespa_cloud.delete()
self.vespa_cloud.delete()


class TestMsmarcoApplicationWithTokenAuth(TestApplicationCommon):
Expand Down
2 changes: 1 addition & 1 deletion vespa/test_integration_vespa_cloud_vector_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,6 @@ def tearDown(self) -> None:
self.assertEqual(len(response.hits), 0)
print(response.get_json())
shutil.rmtree(self.disk_folder, ignore_errors=True)
#self.vespa_cloud.delete()
self.vespa_cloud.delete()


0 comments on commit 268bd79

Please sign in to comment.