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

chore: Add Docker image tests #152

Merged
merged 2 commits into from
Jun 27, 2024
Merged

chore: Add Docker image tests #152

merged 2 commits into from
Jun 27, 2024

Conversation

nieomylnieja
Copy link
Contributor

@nieomylnieja nieomylnieja commented Jun 27, 2024

Motivation

Currently we're not really testing the Dockerfile image directly nor the built images.
In our bats tests we're just using the Dockerfile to build the sloctl binary and copy it to bats container.
Since running dind (Docker in Docker) images has proven tricky to me I've decided to write this basic tests in Go instead.
The tests should only check basic interactions and not cover the larger spectrum that bats tests cover.

Summary

Updated workflows for e2e tests as well as release workflow.

Testing

Run:

SLOCTL_CLIENT_ID=<ID> SLOCTL_CLIENT_SECRET=*** SLOCTL_OKTA_ORG_URL=<ORG_URL> SLOCTL_OKTA_AUTH_SERVER=<SERVER> SLOCTL_E2E_DOCKER_TEST_IMAGE=nobl9/sloctl make test/go/e2e

Note that SLOCTL_E2E_DOCKER_TEST_IMAGE is optional, if not provided the image will be built withing the test code.

Example dispatch runs:

@nieomylnieja nieomylnieja requested a review from BSski June 27, 2024 13:10
@nieomylnieja nieomylnieja merged commit fd8c29d into main Jun 27, 2024
9 of 10 checks passed
@nieomylnieja nieomylnieja deleted the add-docker-image-tests branch June 27, 2024 14:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants