-
Notifications
You must be signed in to change notification settings - Fork 0
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
Integration tests #42
Conversation
7c05b9e
to
0b7dc33
Compare
da1a3c1
to
a66a5f3
Compare
@@ -16,6 +18,12 @@ pipeline: | |||
- golint $(go list ./... | grep -v /vendor | grep -v /mocks) | |||
- go vet $(go list ./... | grep -v /vendor) | |||
- go get github.com/vektra/mockery/.../ | |||
# We need kubeadm and docker for integration tests |
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.
Have below as a script instead maybe?
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.
By your command :)
pkg/etcd/etcd_test.go
Outdated
|
||
const containerName string = "ectd_int_test" | ||
|
||
var etcdStarted = false |
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.
I would not use global variables in testing. Test cases should be self contained without state leakage.
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.
They are, the etcd back end is only loaded once for speed and no tests use overlapping data.
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.
I do agree in principle but it's a trade-off I guess but for now speed over safeguarding future poor tests.
4eddc67
to
a3ad307
Compare
a3ad307
to
4011fab
Compare
So far added etcd.
Will Fix #40
Also Fixes #9