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

[release-1.31] ci: fix reload config for empty pinned image test #8632

Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
test: fix empty pinned_images test
As the test is doing multiple reloads, it was hard to use wait_for_log to synchronize
on the end of the reload process.
With the modification on wait_for_log to allow waiting for multiple occurences of a
log message, we can simplify this test, and make sure it's actually in sync.

Keeping only one "wait_for_log" calls should be enough then - no need for multiple
synchronization points, and the config validation is done by the calls to "crictl images".

Fixes: #8324

Signed-off-by: Julien Ropé <jrope@redhat.com>
  • Loading branch information
littlejawa authored and openshift-cherrypick-robot committed Sep 30, 2024
commit a673a7ca44ea1a74bbfaaaeeafb3524ecb687086
1 change: 0 additions & 1 deletion contrib/test/ci/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
state: present
loop: "{{ ['cgroups.bats'] | product(kata_skip_cgroups_tests) \
+ ['command.bats'] | product(kata_skip_command_tests) \
+ ['reload_config.bats'] | product(kata_skip_reload_config) \
+ ['crio-check.bats'] | product(kata_skip_crio_check_tests) \
+ ['crio-wipe.bats'] | product(kata_skip_crio_wipe_tests) \
+ ['ctr.bats'] | product(kata_skip_ctr_tests) \
Expand Down
2 changes: 0 additions & 2 deletions contrib/test/ci/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,6 @@ kata_skip_cgroups_tests:
kata_skip_command_tests:
- 'test "crio commands"'
- 'test "log max boundary testing"'
kata_skip_reload_config:
- 'test "reload config should remove pinned images when an empty list is provided"'
kata_skip_crio_check_tests:
- 'test "storage directory check should wipe everything on repair errors"'
kata_skip_crio_wipe_tests:
Expand Down
6 changes: 1 addition & 5 deletions test/reload_config.bats
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,7 @@ EOF
# Add a pinned image to the configuration
printf '[crio.image]\npinned_images = ["%s", ""]\n' $EXAMPLE_IMAGE > "$CRIO_CONFIG_DIR"/01-overwrite
reload_crio
wait_for_log 'Set config pinned_images to \\"quay.io/crio/fedora-crio-ci:latest\\"'
wait_for_log "Configuration reload completed"
wait_for_log 'pinned_images = \[\\"quay.io/crio/fedora-crio-ci:latest\\"\]'

# Verify that the image is pinned
output=$(crictl images -o json | jq ".images[] | select(.repoTags[] == \"$EXAMPLE_IMAGE\") |.pinned")
Expand All @@ -287,9 +285,7 @@ EOF
# Remove the pinned image from the configuration
printf '[crio.image]\npinned_images = []\n' > "$CRIO_CONFIG_DIR"/01-overwrite
reload_crio
wait_for_log 'Set config pinned_images to \\"\[\]\\"'
wait_for_log "Configuration reload completed"
wait_for_log 'pinned_images = \[\]'
wait_for_log "Configuration reload completed" "$LAST_TIMESTAMP"

# Verify that the image is no longer pinned
output=$(crictl images -o json | jq ".images[] | select(.repoTags[] == \"$EXAMPLE_IMAGE\") |.pinned")
Expand Down
Loading