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 run-integration-tests.sh script #698

Merged
merged 4 commits into from
Nov 12, 2019
Merged

Conversation

nckturner
Copy link
Contributor

Issue #, if available:
#697

Description of changes:

  • Runs integration tests
  • Uses aws-k8s-tester
  • Adapted from CSI test script, there may still be some stuff in here
    that won't apply

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

scripts/up-test-cluster.sh Outdated Show resolved Hide resolved
make docker IMAGE=$IMAGE_NAME VERSION=$IMAGE_VERSION
docker push $IMAGE_NAME:$IMAGE_VERSION

sed -i'.bak' "s,602401143452.dkr.ecr.us-west-2.amazonaws.com/amazon-k8s-cni,$IMAGE_NAME," ./config/v1.5/aws-k8s-cni.yaml
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if this works on linux

nckturner and others added 3 commits October 31, 2019 22:19
- Runs integration tests
- Uses aws-k8s-tester
- Adapted from CSI test script, there may still be some stuff in here
that won't apply
Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

Great start on this, @nckturner!

scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/up-test-cluster.sh Outdated Show resolved Hide resolved
scripts/run-integration-tests.sh Outdated Show resolved Hide resolved
scripts/up-test-cluster.sh Outdated Show resolved Hide resolved
@nckturner nckturner force-pushed the integration branch 2 times, most recently from 1e52dad to 11512e5 Compare November 7, 2019 08:32
@nckturner
Copy link
Contributor Author

Updated the PR and addressed your comments @jaypipes

@nckturner
Copy link
Contributor Author

Depends on: aws/aws-k8s-tester#62

Copy link
Contributor

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

Needs to wait for the aws-k8s-tester PR to merge, but in the meantime, there's a resource cleanup that is needed... see inline

f = framework.NewDefaultFramework("cni-integration")

ginkgo.It("should enable pod-pod communication", func() {
serverPod := newTestPod()
Copy link
Contributor

Choose a reason for hiding this comment

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

I think you need to clean up this resource, no? Otherwise, pods will continue to build up on the test cluster until the cluster is destroyed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added a clean up.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer to set DeleteNamespaceOnFailure https://github.com/kubernetes/kubernetes/blob/cf06a2efd6ec950dc6707b57cd55cb4f50d29f33/test/e2e/framework/test_context.go#L278 true.

The problem with that is that you cannot diagnose something if a failure occurs.

- Fix env vars
- Fix Deprovision command
- Split test and cluster config into separate /tmp directories
- combine cluster functions into lib/cluster.sh
@nckturner
Copy link
Contributor Author

The aws-k8s-tester PR is merged, can you take another look @jaypipes?

@jaypipes
Copy link
Contributor

The aws-k8s-tester PR is merged, can you take another look @jaypipes?

Build was failing, though it looks to be transient failure in getting go lint tool. I've restarted the build jobs and will approve once I see a green.

@nckturner nckturner changed the title [WIP] Add run-integration-tests.sh script Add run-integration-tests.sh script Nov 12, 2019
@wongma7
Copy link
Member

wongma7 commented Nov 12, 2019

did not review bash because I hate it, also hate that we are calling these "integration" when we're spinning up a kubernetes cluster and testing cni "end to end" :)

f = framework.NewDefaultFramework("cni-integration")

ginkgo.It("should enable pod-pod communication", func() {
serverPod := newTestPod()
Copy link
Contributor

Choose a reason for hiding this comment

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

Prefer to set DeleteNamespaceOnFailure https://github.com/kubernetes/kubernetes/blob/cf06a2efd6ec950dc6707b57cd55cb4f50d29f33/test/e2e/framework/test_context.go#L278 true.

The problem with that is that you cannot diagnose something if a failure occurs.

@jaypipes jaypipes merged commit 3f3a2a9 into aws:master Nov 12, 2019
mogren pushed a commit to mogren/amazon-vpc-cni-k8s that referenced this pull request Dec 15, 2019
* Add run-integration-tests.sh script

- Runs integration tests
- Uses aws-k8s-tester
- Adapted from CSI test script, there may still be some stuff in here
that won't apply

* Add node ping test and make ginkgo verbose

* Remove kubectl exec test code

* Fix test runner script

- Fix env vars
- Fix Deprovision command
- Split test and cluster config into separate /tmp directories
- combine cluster functions into lib/cluster.sh
jaypipes pushed a commit that referenced this pull request Dec 19, 2019
* Add run-integration-tests.sh script

- Runs integration tests
- Uses aws-k8s-tester
- Adapted from CSI test script, there may still be some stuff in here
that won't apply

* Add node ping test and make ginkgo verbose

* Remove kubectl exec test code

* Fix test runner script

- Fix env vars
- Fix Deprovision command
- Split test and cluster config into separate /tmp directories
- combine cluster functions into lib/cluster.sh
mogren pushed a commit to mogren/amazon-vpc-cni-k8s that referenced this pull request Apr 20, 2020
* Add run-integration-tests.sh script

- Runs integration tests
- Uses aws-k8s-tester
- Adapted from CSI test script, there may still be some stuff in here
that won't apply

* Add node ping test and make ginkgo verbose

* Remove kubectl exec test code

* Fix test runner script

- Fix env vars
- Fix Deprovision command
- Split test and cluster config into separate /tmp directories
- combine cluster functions into lib/cluster.sh
mogren pushed a commit that referenced this pull request Apr 20, 2020
* Add run-integration-tests.sh script

- Runs integration tests
- Uses aws-k8s-tester
- Adapted from CSI test script, there may still be some stuff in here
that won't apply

* Add node ping test and make ginkgo verbose

* Remove kubectl exec test code

* Fix test runner script

- Fix env vars
- Fix Deprovision command
- Split test and cluster config into separate /tmp directories
- combine cluster functions into lib/cluster.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants