Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add retry for custom image test #266

Merged
merged 1 commit into from
Jan 8, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions tests/test_bundle.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,13 @@ async def test_eventing_custom_image(ops_test: OpsTest, restore_eventing_custom_

# Assert that the activator image is trying to use the custom image.
client = lightkube.Client()
activator_deployment = client.get(
Deployment, "eventing-controller", namespace=KNATIVE_EVENTING_NAMESPACE
)
assert activator_deployment.spec.template.spec.containers[0].image == fake_image

for attempt in RETRY_FOR_THREE_MINUTES:
with attempt:
activator_deployment = client.get(
Deployment, "eventing-controller", namespace=KNATIVE_EVENTING_NAMESPACE
)
assert activator_deployment.spec.template.spec.containers[0].image == fake_image


@pytest_asyncio.fixture
Expand Down Expand Up @@ -317,8 +320,13 @@ async def test_serving_custom_image(ops_test: OpsTest, restore_serving_custom_im

# Assert that the activator image is trying to use the custom image.
client = lightkube.Client()
activator_deployment = client.get(Deployment, "activator", namespace=KNATIVE_SERVING_NAMESPACE)
assert activator_deployment.spec.template.spec.containers[0].image == fake_image

for attempt in RETRY_FOR_THREE_MINUTES:
with attempt:
activator_deployment = client.get(
Deployment, "activator", namespace=KNATIVE_SERVING_NAMESPACE
)
assert activator_deployment.spec.template.spec.containers[0].image == fake_image


async def test_ksvc_deployment_configs(ops_test: OpsTest, remove_helloworld_example):
Expand Down
Loading