Skip to content

Commit

Permalink
Bug: MLFlow Seldon secrets is incorrectly formatted.
Browse files Browse the repository at this point in the history
canonical/bundle-kubeflow#429

Summary of changes:
- Fixed integration tests.
  • Loading branch information
Ivan Chvets committed Nov 30, 2022
1 parent b57575f commit 754da0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
1 change: 1 addition & 0 deletions charms/mlflow-server/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
black
flake8
pytest
pytest-asyncio
pytest-mock
pytest-lazy-fixture
12 changes: 7 additions & 5 deletions charms/mlflow-server/tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,15 @@ async def test_deploy_with_ingress(ops_test: OpsTest):


@pytest.fixture
@pytest.mark.asyncio
async def url_with_ingress(ops_test: OpsTest):
status = await ops_test.model.get_status()
url = f"http://{status['applications']['istio-gateway']['public-address']}.nip.io/mlflow/"
yield url


@pytest.fixture
@pytest.mark.asyncio
async def url_without_ingress(ops_test: OpsTest):
status = await ops_test.model.get_status()
unit_name = ops_test.model.applications[CHARM_NAME].units[0].name
Expand All @@ -269,6 +271,7 @@ async def url_without_ingress(ops_test: OpsTest):
@pytest.mark.parametrize(
"url", [lazy_fixture("url_without_ingress"), lazy_fixture("url_with_ingress")]
)
@pytest.mark.asyncio
async def test_access_dashboard(request, url):
options = Options()
options.headless = True
Expand All @@ -295,9 +298,8 @@ async def test_access_dashboard(request, url):
sleep(5)
else:
driver.get(url)
wait.until(
expected_conditions.presence_of_element_located(
(By.CLASS_NAME, "experiment-view-container")
)
)

yield driver, wait, url

Path(f"/tmp/selenium-{request.node.name}.har").write_text(driver.har)
driver.get_screenshot_as_file(f'/tmp/selenium-{request.node.name}.png')

0 comments on commit 754da0f

Please sign in to comment.