Skip to content

Improve ec2-controller e2e tests by validating resource data #1235

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

Closed
3 tasks
brycahta opened this issue Mar 23, 2022 · 10 comments
Closed
3 tasks

Improve ec2-controller e2e tests by validating resource data #1235

brycahta opened this issue Mar 23, 2022 · 10 comments
Assignees
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@brycahta
Copy link
Contributor

Summary

The initial resources for ec2-controller did not ship with a lot of functionality-- mostly create/delete. The e2e tests reflect this behavior and only check for resource existence. In other words, user-provided data in the Spec is not validated against AWS. As we continue adding functionality to ec2-controller, we should also improve the tests to validate data in addition to existence.

Note: Validating data in e2e tests will most likely be necessary for passing security reviews

Implementation

  • Refactor EC2Validator class to add single-purpose methods (i.e. get_nat_gateway) & remove assert helpers
  • Leverage single-purpose helpers & explicitly assert in e2e test methods
  • Update e2e test methods to validate Spec fields against aws api
@brycahta brycahta added the kind/enhancement Categorizes issue or PR as related to existing feature enhancements. label Mar 23, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 21, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-bot ack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2022
@brycahta
Copy link
Contributor Author

/remove-lifecycle stale

@ack-bot ack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jun 21, 2022
@brycahta brycahta moved this to In Progress in EC2 GA Roadmap Aug 30, 2022
@brycahta brycahta moved this from In Progress to Todo in EC2 GA Roadmap Sep 6, 2022
@eks-bot
Copy link

eks-bot commented Sep 19, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-bot ack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 19, 2022
@a-hilaly
Copy link
Member

/remove-lifecycle stale

@ack-bot ack-bot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Sep 19, 2022
@brycahta brycahta self-assigned this Sep 21, 2022
@brycahta brycahta moved this from Todo to In Progress in EC2 GA Roadmap Sep 29, 2022
ack-bot pushed a commit to aws-controllers-k8s/ec2-controller that referenced this issue Sep 29, 2022
Issue #, if available: aws-controllers-k8s/community#1235

Description of changes: 
* Use `acktest.tags` assertions in e2e tests to accurately test for ACK tags and user-defined tags
* Enhance existing tag tests by checking both server-side values as well as `Spec.Tags` values
* Add hook code for `Instance` and `RouteTable` so ACK tags are not populated in `Spec`

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
@eks-bot
Copy link

eks-bot commented Dec 20, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-bot ack-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 20, 2022
@a-hilaly a-hilaly removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Dec 20, 2022
@ack-bot
Copy link
Collaborator

ack-bot commented Mar 21, 2023

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle stale

@ack-prow ack-prow bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Mar 21, 2023
@ack-bot
Copy link
Collaborator

ack-bot commented Apr 20, 2023

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/lifecycle rotten

@ack-prow ack-prow bot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 20, 2023
@ack-bot
Copy link
Collaborator

ack-bot commented May 22, 2023

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/close

1 similar comment
@ack-bot
Copy link
Collaborator

ack-bot commented Jun 21, 2023

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/close

@ack-prow
Copy link

ack-prow bot commented Jun 21, 2023

@ack-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Provide feedback via https://github.com/aws-controllers-k8s/community.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ack-prow ack-prow bot closed this as completed Jun 21, 2023
@github-project-automation github-project-automation bot moved this from In Progress to Done in EC2 GA Roadmap Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/enhancement Categorizes issue or PR as related to existing feature enhancements. lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
No open projects
Status: Done
Development

No branches or pull requests

4 participants