-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 some tests #121
Add some tests #121
Conversation
@richardcase I would be curious to see how we would test 3435db8, I think it maybe an easier place to start (maybe along with SSH key importer), as these are simple and well isolated APIs. Also we will probably stop using EKS API directly sooner or later in favour of CloudFormation. |
Added an initial couple of tests to prove that mocking of the AWS services is possible.
Added Ginkgo to structure the tests better. Added input validation to the mocked services in the tests.
@richardcase please review, and merge if you are happy with my changes, I think this is all in a good shape now and we can iterate on actual tests in separate PRs! 🎉 |
@errordeveloper - i think it would be fairly easy to create tests around SelectAvailabilityZones. I will give it a go. |
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.
LGTM
|
||
import _ "github.com/vektra/mockery" | ||
|
||
//go:generate mockery -dir=../../../vendor/github.com/aws/aws-sdk-go/service/cloudformation/cloudformationiface -name=CloudFormationAPI -output=./ |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
} | ||
|
||
func (m MockProvider) EKS() eksiface.EKSAPI { return m.eks } | ||
func (m MockProvider) mockEKS() *mocks.EKSAPI { return m.EKS().(*mocks.EKSAPI) } |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Add CHANGELOG for v0.1.0 alpha release
Show the work-in-progress for adding tests to eksctl. Its currently pretty rough.
Issue #46