Skip to content

Commit

Permalink
Revert "disable configmap tests"
Browse files Browse the repository at this point in the history
This reverts commit 061a045.
  • Loading branch information
orfeas-k committed Sep 29, 2023
1 parent 7cecd1f commit 99e70a3
Showing 1 changed file with 31 additions and 31 deletions.
62 changes: 31 additions & 31 deletions tests/integration/test_charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,37 +69,37 @@ async def test_build_and_deploy(ops_test: OpsTest):
assert ops_test.model.applications[APP_NAME].units[0].workload_status == "active"


# @pytest.mark.abort_on_fail
# async def test_configmap_created(lightkube_client: Client, ops_test: OpsTest):
# """Test configmaps contents with default config."""
# seldon_config_cm = lightkube_client.get(
# ConfigMap, SELDON_CM_NAME, namespace=ops_test.model_name
# )

# assert seldon_config_cm.data == SELDON_CONFIG


# @pytest.mark.abort_on_fail
# async def test_configmap_changes_with_config(lightkube_client: Client, ops_test: OpsTest):
# await ops_test.model.applications[APP_NAME].set_config(
# {
# "custom_images": '{"configmap__predictor__sklearn__v2": "custom:1.0", "configmap_explainer": "custom:2.0"}' # noqa: E501
# }
# )
# await ops_test.model.wait_for_idle(
# apps=[APP_NAME], status="active", raise_on_blocked=True, timeout=300
# )
# seldon_config_cm = lightkube_client.get(
# ConfigMap, SELDON_CM_NAME, namespace=ops_test.model_name
# )

# assert seldon_config_cm.data == SELDON_CONFIG_CHANGED

# # Change to default settings
# await ops_test.model.applications[APP_NAME].set_config({"custom_images": "{}"})
# await ops_test.model.wait_for_idle(
# apps=[APP_NAME], status="active", raise_on_blocked=True, timeout=300
# )
@pytest.mark.abort_on_fail
async def test_configmap_created(lightkube_client: Client, ops_test: OpsTest):
"""Test configmaps contents with default config."""
seldon_config_cm = lightkube_client.get(
ConfigMap, SELDON_CM_NAME, namespace=ops_test.model_name
)

assert seldon_config_cm.data == SELDON_CONFIG


@pytest.mark.abort_on_fail
async def test_configmap_changes_with_config(lightkube_client: Client, ops_test: OpsTest):
await ops_test.model.applications[APP_NAME].set_config(
{
"custom_images": '{"configmap__predictor__sklearn__v2": "custom:1.0", "configmap_explainer": "custom:2.0"}' # noqa: E501
}
)
await ops_test.model.wait_for_idle(
apps=[APP_NAME], status="active", raise_on_blocked=True, timeout=300
)
seldon_config_cm = lightkube_client.get(
ConfigMap, SELDON_CM_NAME, namespace=ops_test.model_name
)

assert seldon_config_cm.data == SELDON_CONFIG_CHANGED

# Change to default settings
await ops_test.model.applications[APP_NAME].set_config({"custom_images": "{}"})
await ops_test.model.wait_for_idle(
apps=[APP_NAME], status="active", raise_on_blocked=True, timeout=300
)


async def test_seldon_istio_relation(ops_test: OpsTest):
Expand Down

0 comments on commit 99e70a3

Please sign in to comment.