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

Automate envtest setup from tests if not configured #6857

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

g-gaston
Copy link
Member

Description of changes:
Before this, running a test that required envtest without setting the KUBEBUILDER_ASSETS env var would fail. Now, if the env var is not set, the envtest setup will download the necessary assets and configure the tests to use them.

This means that go test (on individual tests or whole packages) now works out of the box.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@eks-distro-bot eks-distro-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 20, 2023
Copy link
Member

@jonathanmeier5 jonathanmeier5 left a comment

Choose a reason for hiding this comment

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

/lgtm

this is great

Before this, running a test that required envtest without setting the
KUBEBUILDER_ASSETS env var would fail. Now, if the env var is not set,
the envtest setup will download the necessary assets and configure the
tests to use them.

This means that `go test` (on individual tests or whole packages) now
works out of the box.
@g-gaston g-gaston force-pushed the automate-envtest-setup branch from 33fb437 to 1d7cd27 Compare October 20, 2023 18:47
@codecov
Copy link

codecov bot commented Oct 20, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9193e87) 72.01% compared to head (1d7cd27) 72.01%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6857   +/-   ##
=======================================
  Coverage   72.01%   72.01%           
=======================================
  Files         532      532           
  Lines       41644    41644           
=======================================
  Hits        29991    29991           
  Misses       9980     9980           
  Partials     1673     1673           

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

@g-gaston
Copy link
Member Author

/approve

@eks-distro-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: g-gaston

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jonathanmeier5
Copy link
Member

/lgtm

@eks-distro-bot eks-distro-bot merged commit a660d97 into aws:main Oct 20, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved lgtm size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants