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

Tests! #18

Open
lucymhdavies opened this issue Feb 9, 2018 · 8 comments
Open

Tests! #18

lucymhdavies opened this issue Feb 9, 2018 · 8 comments

Comments

@lucymhdavies
Copy link

I'm going to make every effort to make sure that all new stuff that gets added to this is tested.

I would very much like to go through and add tests for existing stuff too.

And set this up with Travis or Circle too.

@lucymhdavies
Copy link
Author

lucymhdavies commented Feb 9, 2018

Making a start on this with lucymhdavies@705795c

Got to start somewhere, right?

@edupo
Copy link

edupo commented Mar 26, 2018

https://github.com/edupo/cali/blob/master/.travis.yml
It executes lot's of static analysis already...

@lucymhdavies
Copy link
Author

Cool. Sounds like a good thing to have :)

I added a CircleCI config a while back, but I have no real preference for Circle over Travis, if you want to PR that in :)
(I've only added precisely two tests thus far anyway)

@edupo
Copy link

edupo commented Mar 27, 2018

I don't mind either.
I open a PR #27 but we can port some of the test to cci but some of them may fail with the current code.

@lucymhdavies
Copy link
Author

lucymhdavies commented Mar 30, 2018

Merged your PR for Travis. :)

Build Status

We can tweak it down the line, and decide on Circle vs Travis. But this gives us something to work with.

Once it's finished, we'll see what issues it finds, and raise issues to address those.

@lucymhdavies
Copy link
Author

lucymhdavies commented Mar 30, 2018

The command "go test -v -race ./..." exited with 2.
0.86s$ go vet ./...
# github.com/skybet/cali
./task.go:87: Errorf format %s reads arg #1, but call has only 0 args
./task.go:96: Errorf format %s reads arg #1, but call has only 0 args
The command "go vet ./..." exited with 2.
21.33s$ megacheck ./...
docker.go:205:20: os.Kill cannot be trapped (did you mean syscall.SIGTERM?) (SA1016)
docker.go:241:3: should check returned error before deferring hijack.Conn.Close() (SA5001)
docker.go:322:2: should use 'return <expr>' instead of 'if <expr> { return <bool> }; return <bool>' (S1008)
docker.go:48:2: field running is unused (U1000)
The command "megacheck ./..." exited with 1.
0.01s$ gocyclo -over 19 $GO_FILES
The command "golint -set_exit_status $(go list ./...)" exited with 1.

@lucymhdavies
Copy link
Author

Working on fixes for the trivial issues in #35

@edupo
Copy link

edupo commented Apr 3, 2018

The gocyclo was one of the hardest to fix. I just fixed it in my fork after a complete re-factor of what I understand as the Docker library cali uses to offer it's functionality.

So I suggest to disable that check until the docker part is cleaned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants