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

add testType field to skaffold inspect tests output #6561

Merged

Conversation

aaron-prindle
Copy link
Contributor

No description provided.

@aaron-prindle aaron-prindle requested a review from a team as a code owner September 2, 2021 19:31
@google-cla google-cla bot added the cla: yes label Sep 2, 2021
@codecov
Copy link

codecov bot commented Sep 2, 2021

Codecov Report

Merging #6561 (a9787c3) into main (290280e) will increase coverage by 0.04%.
The diff coverage is 58.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #6561      +/-   ##
==========================================
+ Coverage   70.48%   70.53%   +0.04%     
==========================================
  Files         515      515              
  Lines       23150    23150              
==========================================
+ Hits        16317    16328      +11     
+ Misses       5776     5768       -8     
+ Partials     1057     1054       -3     
Impacted Files Coverage Δ
cmd/skaffold/app/cmd/cmd.go 70.68% <0.00%> (-0.38%) ⬇️
cmd/skaffold/app/cmd/flags.go 90.81% <ø> (ø)
cmd/skaffold/skaffold.go 0.00% <ø> (ø)
pkg/skaffold/build/buildpacks/logger.go 0.00% <ø> (ø)
pkg/skaffold/config/options.go 100.00% <ø> (ø)
pkg/skaffold/server/server.go 46.87% <0.00%> (-0.75%) ⬇️
pkg/skaffold/event/v2/event.go 84.22% <66.66%> (-0.37%) ⬇️
pkg/skaffold/build/buildpacks/lifecycle.go 83.59% <100.00%> (ø)
pkg/skaffold/inspect/tests/list.go 100.00% <100.00%> (ø)
pkg/skaffold/event/v2/status_check.go 85.45% <0.00%> (-14.55%) ⬇️
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de549d5...a9787c3. Read the comment docs.

l := &testList{Tests: []interface{}{}}
for _, c := range cfgs {
for _, t := range c.Test {
for _, ct := range t.CustomTests {
l.Tests = append(l.Tests, ct)
l.Tests = append(l.Tests, customTestEntry{"custom-test", ct})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:
define as constants

var testTypes = struct {
    custom string
    cst string
} {
    custom: "custom",
    cst: "container-structure-test",
}

...
...

l.Tests = append(l.Tests, customTestEntry{testTypes.custom, ct})

Copy link
Contributor

@gsquared94 gsquared94 left a comment

Choose a reason for hiding this comment

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

lgtm!

@tejal29 tejal29 merged commit 51b296e into GoogleContainerTools:main Sep 10, 2021
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