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 some tests #121

Merged
merged 8 commits into from
Jul 18, 2018
Merged

Add some tests #121

merged 8 commits into from
Jul 18, 2018

Conversation

richardcase
Copy link
Contributor

Show the work-in-progress for adding tests to eksctl. Its currently pretty rough.

  • Added an initial couple of tests to see if mocking of the AWS services is realistic.

Issue #46

@errordeveloper
Copy link
Contributor

@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.

richardcase and others added 7 commits July 17, 2018 17:50
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.
@errordeveloper errordeveloper changed the title WIP: Tests for eksctl Add some tests Jul 17, 2018
@errordeveloper
Copy link
Contributor

errordeveloper commented Jul 17, 2018

@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! 🎉 :shipit:

@richardcase
Copy link
Contributor Author

@errordeveloper - i think it would be fairly easy to create tests around SelectAvailabilityZones. I will give it a go.

Copy link
Contributor Author

@richardcase richardcase left a 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.

}

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.

@errordeveloper errordeveloper merged commit 253542f into eksctl-io:master Jul 18, 2018
torredil pushed a commit to torredil/eksctl that referenced this pull request May 20, 2022
Add CHANGELOG for v0.1.0 alpha release
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