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

Integration tests #42

Merged
merged 6 commits into from
Jun 30, 2017
Merged

Integration tests #42

merged 6 commits into from
Jun 30, 2017

Conversation

lewismarshall
Copy link
Collaborator

So far added etcd.

Will Fix #40
Also Fixes #9

@lewismarshall lewismarshall force-pushed the integration_tests branch 10 times, most recently from 7c05b9e to 0b7dc33 Compare June 30, 2017 10:14
@lewismarshall lewismarshall force-pushed the integration_tests branch 3 times, most recently from da1a3c1 to a66a5f3 Compare June 30, 2017 10:32
@lewismarshall lewismarshall changed the title WIP: Integration tests Integration tests Jun 30, 2017
@@ -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
Copy link

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

By your command :)


const containerName string = "ectd_int_test"

var etcdStarted = false
Copy link

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.

Copy link
Collaborator Author

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.

Copy link
Collaborator Author

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.

@lewismarshall lewismarshall force-pushed the integration_tests branch 3 times, most recently from 4eddc67 to a3ad307 Compare June 30, 2017 14:27
@lewismarshall lewismarshall merged commit f55462a into master Jun 30, 2017
@lewismarshall lewismarshall deleted the integration_tests branch June 30, 2017 14:41
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