-
Notifications
You must be signed in to change notification settings - Fork 70
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
test: buildkit with defaults #682
test: buildkit with defaults #682
Conversation
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
It looks like the failing test is "default buildkit address", but the test runs and passes locally. Is it possible that the test is failing because GitHub actions doesn't have a locally running BuildKit client? The test initializes @cpuguy83 mentioned at a previous LFX mentorship meeting that the old TODO is likely referring to testing BuildKit with nothing passed in, which is why this test does not perfectly match up with the old TODO in code. |
@MiahaCybersec can you check what docker version is being used in the workflow? If it is not 23.0 or later, buildkit will not be enabled by default, and you would need to change the unit test workflow to enable it |
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
Signed-off-by: Miaha Cybersec <[email protected]>
…o test-buildkit-with-defaults
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
pkg/buildkit/buildkit_test.go
Outdated
@@ -197,6 +197,18 @@ func TestNewClient(t *testing.T) { | |||
cancel() | |||
checkMissingCapsError(t, err, requiredCaps...) | |||
}) | |||
t.Run("faulty addr", func(t *testing.T) { | |||
t.Parallel() | |||
addr := newMockBuildkitAPI(t) // this should return a faulty addr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you have more details on this comment?
Its not clear from the call why this should be faulty and may produce something else in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That comment was left in by mistake, the address validation in client.New
does not properly parse invalid addresses. If an address such as 300.300.300.300
is passed in, it shows no errors.
I've pushed a new commit that updates the test to be named faulty key path
and added additional error validation for the tests.
Signed-off-by: Miaha Cybersec <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #682 +/- ##
==========================================
+ Coverage 33.01% 34.22% +1.20%
==========================================
Files 18 18
Lines 1578 1578
==========================================
+ Hits 521 540 +19
+ Misses 1024 1007 -17
+ Partials 33 31 -2 ☔ View full report in Codecov by Sentry. |
I'm not sure why the lint is failing. It says |
@MiahaCybersec haha that's confusing. Looks like it's deprecated in favor of |
…tests Signed-off-by: Miaha Cybersec <[email protected]>
The unit tests for |
Closes #595