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: Fix bats tests #306

Merged
merged 4 commits into from
Mar 12, 2025
Merged

chore: Fix bats tests #306

merged 4 commits into from
Mar 12, 2025

Conversation

nieomylnieja
Copy link
Contributor

@nieomylnieja nieomylnieja commented Mar 12, 2025

Motivation

With the changes introduced to sloctl version command in #304
we no longer have the embedded sloctl version from VERSION file as fallback.
Instead, we're inferring the version (if it was not set during build time) using runtime/debug package.

This works fine, except for scenarios where we build sloctl binary without the version.
One instance of such usage are bats e2e tests.
Due to that, and the fallback version being 0.0.0 the API was not returning the AWS IAM id for data export as it only returns it for sloctl version v0.0.94 and higher.

Summary

Version is now set for all Makefile build commands, it is inferred from the current latest git tag and a build suffix is added, which will look like this: 0.12.0-test.

Testing

Run the e2e tests.

Dispatched tests run: https://github.com/nobl9/sloctl/actions/runs/13819778124/job/38662027117.
The run failed on another step cause I cancelled the run before this run and it left dangling resources.

@nieomylnieja nieomylnieja merged commit 3b75594 into main Mar 12, 2025
7 of 8 checks passed
@nieomylnieja nieomylnieja deleted the fix-bats-tests branch March 12, 2025 19:32
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.

2 participants