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

✨ Implement e2e integration testing by using CAPI v1.6 test framework #147

Merged
merged 1 commit into from
Jan 30, 2024

Conversation

Jont828
Copy link
Contributor

@Jont828 Jont828 commented Jan 17, 2024

What this PR does / why we need it: Finally got around to adding e2e testing. This will substantially improve the contributor process by providing a confident signal on whether or not a PR breaks anything in the e2e scenario.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #149

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Jont828

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jan 17, 2024
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jan 17, 2024
@Jont828 Jont828 force-pushed the capi-test-framework branch 7 times, most recently from 875c7f6 to 9e562c1 Compare January 24, 2024 01:33
@Jont828 Jont828 force-pushed the capi-test-framework branch 2 times, most recently from cb25512 to 7c056bc Compare January 25, 2024 23:22
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
go.mod Show resolved Hide resolved
hack/common-vars.sh Outdated Show resolved Hide resolved
hack/gen-flavors.sh Outdated Show resolved Hide resolved
test/e2e/common.go Outdated Show resolved Hide resolved
test/e2e/config/helm.yaml Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
test/e2e/e2e_suite_test.go Outdated Show resolved Hide resolved
@Jont828
Copy link
Contributor Author

Jont828 commented Jan 30, 2024

@mboersma Just followed up on your comments. @nawazkh can you give this a review too before we get ready to merge?

Copy link
Member

@nawazkh nawazkh left a comment

Choose a reason for hiding this comment

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

Good work @Jont828 ! Just have some minor nits.

I was able to successfully run the the test locally (Mac OS).

❯ ./scripts/ci-e2e.sh
.
.
Ran 1 of 1 Specs in 411.121 seconds
SUCCESS! -- 1 Passed | 0 Failed | 0 Pending | 0 Skipped


Ginkgo ran 1 suite in 7m14.369243292s
Test Suite Passed

Do we know if the tests are running good on Linux ?

test/e2e/config/helm.yaml Show resolved Hide resolved
test/e2e/data/addons-helm/v1beta1/bases/calico.yaml Outdated Show resolved Hide resolved
test/e2e/data/shared/v1beta1-provider/metadata.yaml Outdated Show resolved Hide resolved
@nawazkh
Copy link
Member

nawazkh commented Jan 30, 2024

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 30, 2024
@k8s-ci-robot k8s-ci-robot merged commit 6c76b10 into kubernetes-sigs:main Jan 30, 2024
12 checks passed
-e2e.skip-resource-cleanup=$(SKIP_RESOURCE_CLEANUP) -e2e.use-existing-cluster=$(USE_EXISTING_CLUSTER)

.PHONY: test-e2e-run
test-e2e-run:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a make help comment here? And maybe clarify the one above for test-e2e-run-skip-manifest?

$(MAKE) test-e2e-run-skip-manifest

.PHONY: get-e2e-kubeconfig
get-e2e-kubeconfig:
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a make help comment here?

@@ -1,6 +1,6 @@
#!/bin/bash

# Copyright 2018 The Kubernetes Authors.
# Copyright 2024 The Kubernetes Authors.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a lawyer, but in general I don't think we should update the copyright assertion date in existing files, just use the current year when new files are added. (The dates don't have to agree between different files in the project.)

cni: calico
repoURL: https://docs.tigera.io/calico/charts
chartName: tigera-operator
# version: ${CALICO_VERSION}
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this a comment or commented-out code?

RepositoryFolder: repositoryFolder,
}

// // Ensuring a CNI file is defined in the config and register a FileTransformation to inject the referenced file as in place of the CNI_RESOURCES envSubst variable.
Copy link
Contributor

Choose a reason for hiding this comment

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

Commented-out code here should be deleted IMHO.

// kubetestConfigFilePath is the path to the kubetest configuration file
kubetestConfigFilePath string

// kubetestRepoListPath
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you flesh out the comment here?

@mboersma
Copy link
Contributor

mboersma commented Jan 30, 2024

D'oh, I was too late. No worries, my comments were mostly cosmetic; I'll follow up with a PR to address them.

Edit: see #161.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add e2e validation for PRs
4 participants