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 vet to tests #126

Merged
merged 1 commit into from
Nov 2, 2017
Merged

Add vet to tests #126

merged 1 commit into from
Nov 2, 2017

Conversation

liztio
Copy link
Contributor

@liztio liztio commented Nov 1, 2017

Our tests should vet, lint, and otherwise verify the hygiene of our code before we allow it into master

@liztio liztio force-pushed the liz-fmtvet branch 2 times, most recently from 9c12c32 to 21d16d2 Compare November 2, 2017 19:17
@liztio liztio requested a review from timothysc November 2, 2017 19:17
@liztio liztio changed the title (WIP) Add vet to tests Add vet to tests Nov 2, 2017
@liztio
Copy link
Contributor Author

liztio commented Nov 2, 2017

Fixes #124

@@ -145,7 +145,7 @@ func TestLoadAllPlugins(t *testing.T) {
}

if len(dsplugin.GetPodSpec().Containers) != 2 {
t.Fatalf("JobPlugin should have 1 container, got 2", len(jobplugin.GetPodSpec().Containers))
t.Fatalf("JobPlugin should have 2 containers, got %d", len(jobplugin.GetPodSpec().Containers))
Copy link
Contributor

Choose a reason for hiding this comment

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

1 container, got %d

Copy link
Contributor Author

Choose a reason for hiding this comment

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

then why's it != 2?

Copy link
Contributor

Choose a reason for hiding this comment

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

wait now I need to dblcheck

Copy link
Contributor

Choose a reason for hiding this comment

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

my bad, ignore this comment.

Makefile Outdated
# Vendor this someday
INSTALL_GOLINT = go get -u github.com/golang/lint/golint
GOLINT_FLAGS ?= -set_exit_status
VET = go vet $(TEST_PKGS) && $(INSTALL_GOLINT) && golint $(GOLINT_FLAGS) $(TEST_PKGS)
Copy link
Contributor

Choose a reason for hiding this comment

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

You could probably break this into 2 var..
VET
LINT

Copy link
Contributor

Choose a reason for hiding this comment

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

Could also add a gfmt check but now were entering into the whole we should break up the target b/c we're chaining too many things.

Makefile Outdated

container: test
container: test vet
Copy link
Contributor

Choose a reason for hiding this comment

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

why is vet needed here?

test: cbuild vet

Adds `go vet` and `golint` to the `make test` task.

Also makes several small, mostly cosmetic changes to bring code into compliance
with sed style-checking tools.

Signed-off-by: liz <liz@heptio.com>
Copy link
Contributor

@timothysc timothysc left a comment

Choose a reason for hiding this comment

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

/lgtm

@timothysc timothysc merged commit 7278301 into vmware-tanzu:master Nov 2, 2017
jhamilton1 pushed a commit to jhamilton1/sonobuoy that referenced this pull request Jun 27, 2018
Add vet to tests
Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com
jhamilton1 pushed a commit to jhamilton1/sonobuoy that referenced this pull request Jun 27, 2018
Add vet to tests
Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com

Signed-off-by: Jesse Hamilton jesse.hamilton@heptio.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants