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

Enable Integration Tests to Use Podman-Built Images #98

Merged

Conversation

frobware
Copy link
Contributor

@frobware frobware commented Aug 9, 2024

Fixes #96.

Summary

This PR ensures that the value of OCI_BIN now determines whether images are loaded from Podman or Docker during integration tests, addressing the issue detailed in Integration Tests Not Using Podman-Built Images. The key updates include:

  • Addition of the loadimagearchive Addon: A new addon, loadimagearchive, has been created by adapting the existing github.com/kong/kubernetes-testing-framework/pkg/clusters/addons/loadimage addon. This new addon supports both Docker and Podman by saving images as tarballs and loading them into kind clusters using the kind load image-archive command. The addon determines which container engine to use based on the value of the OCI_BIN environment variable, ensuring that the correct images are loaded into the cluster.

  • Makefile Updates: The load-images-kind target now respects the value of OCI_BIN and has been reworked to load images via kind load image-archive, similar to the new addon. This change ensures that images corresponding to the specified OCI_BIN (either Docker or Podman) are correctly loaded into the kind cluster.

  • Integration Test Suite: The test suite has been updated to use the new loadimagearchive addon.

Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.61%. Comparing base (a38e60b) to head (208c718).
Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #98   +/-   ##
=======================================
  Coverage   27.61%   27.61%           
=======================================
  Files          81       81           
  Lines        6999     6999           
=======================================
  Hits         1933     1933           
  Misses       4877     4877           
  Partials      189      189           
Flag Coverage Δ
unittests 27.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@frobware
Copy link
Contributor Author

/test bpfman-agent-on-pull-request

Created a new loadimagearchive addon by copying and adapting the
existing loadimage addon from
github.com/kong/kubernetes-testing-framework/pkg/clusters/addons/loadimage.

This new addon extends functionality to support both Podman and Docker
by saving images as tarballs and loading them into kind clusters using
`kind load image-archive`.

Signed-off-by: Andrew McDermott <amcdermo@redhat.com>
Modified the Makefile to respect the `OCI_BIN` environment variable,
switching from `kind load docker-image` to `kind load image-archive`.
This change enables support for both Docker and Podman, depending on the
value of `OCI_BIN`.

Updated the integration test suite to utilise the new loadimagearchive
addon instead of the original loadimage addon. The addon also respects
the `OCI_BIN` variable, ensuring images are loaded into kind clusters
from the correct container engine.

Signed-off-by: Andrew McDermott <amcdermo@redhat.com>
@frobware frobware force-pushed the test-integration-support-podman-and-docker-v2 branch from 405ed9e to 208c718 Compare August 12, 2024 12:40
Copy link
Contributor

@Billy99 Billy99 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mergify mergify bot merged commit 81c92b2 into bpfman:main Aug 13, 2024
20 checks passed
msherif1234 pushed a commit to msherif1234/bpfman-operator that referenced this pull request Nov 15, 2024
…/ocp-bpfman-operator-bundle

chore(deps): update ocp-bpfman-operator-bundle to 1eb24b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Integration Tests Not Using Podman-Built Images
2 participants