Skip to content

Commit

Permalink
- e2e test minor change (aws#591)
Browse files Browse the repository at this point in the history
- Makefile minor change

Co-authored-by: Zijun Wang <[email protected]>
  • Loading branch information
zijun726911 and Zijun Wang authored Jan 19, 2024
1 parent 2e19541 commit a85e54f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ run: ## Run in development mode


.PHONY: presubmit
presubmit: manifest vet lint test ## Run all commands before submitting code
presubmit: vet manifest lint test ## Run all commands before submitting code

.PHONY: vet
vet: ## Vet the code and dependencies
Expand Down Expand Up @@ -123,7 +123,8 @@ e2e-test: ## Run e2e tests against cluster pointed to by ~/.kube/config
-v \
./suites/integration/... \
--ginkgo.focus="${FOCUS}" \
--ginkgo.skip="${SKIP}"
--ginkgo.skip="${SKIP}" \
--ginkgo.v

.SILENT:
.PHONY: e2e-clean
Expand Down
1 change: 1 addition & 0 deletions docs/contributing/developer.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ You can create an IAM Role, with a Trust Policy allowing the primary account to

```
export SECONDARY_ACCOUNT_TEST_ROLE_ARN=arn:aws:iam::000000000000:role/MyRole
export FOCUS="RAM Share"
REGION=us-west-2 make e2e-test
```

Expand Down
7 changes: 4 additions & 3 deletions test/pkg/test/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,16 +155,17 @@ func (env *Framework) ExpectToBeClean(ctx context.Context) {
defer GinkgoRecover()
env.EventuallyExpectNoneFound(ctx, testObject.ListType)
})

tags := env.DefaultTags
tags[model.K8SServiceNamespaceKey] = aws.String(K8sNamespace)
Eventually(func(g Gomega) {
arns, err := env.TaggingClient.FindResourcesByTags(ctx, services.ResourceTypeService, env.DefaultTags)
arns, err := env.TaggingClient.FindResourcesByTags(ctx, services.ResourceTypeService, tags)
env.Log.Infow("Expecting no services created by the controller", "found", arns)
g.Expect(err).To(BeNil())
g.Expect(arns).To(BeEmpty())
}).Should(Succeed())

Eventually(func(g Gomega) {
arns, err := env.TaggingClient.FindResourcesByTags(ctx, services.ResourceTypeTargetGroup, env.DefaultTags)
arns, err := env.TaggingClient.FindResourcesByTags(ctx, services.ResourceTypeTargetGroup, tags)
env.Log.Infow("Expecting no target groups created by the controller", "found", arns)
g.Expect(err).To(BeNil())
g.Expect(arns).To(BeEmpty())
Expand Down

0 comments on commit a85e54f

Please sign in to comment.