-
Notifications
You must be signed in to change notification settings - Fork 150
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
End to end tests in Golang #951
Conversation
54cb349
to
fe13a81
Compare
e2e_tests/e2e_test.go
Outdated
// export KUBECONFIG=/tmp/kube-config-splunk-otel-collector-chart-e2e-testing | ||
// export K8S_VERSION=v1.28.0 | ||
// kind create cluster --kubeconfig=/tmp/kube-config-splunk-otel-collector-chart-e2e-testing --config=.github/workflows/configs/e2e-kind-config-$K8S_VERSION.yaml | ||
// cd e2e_tests/testdata/nodejs | ||
// docker build -t nodejs_test:latest . | ||
// kind load docker-image nodejs_test:latest --name kind | ||
// make cert-manager | ||
// kubectl get csr -o=jsonpath='{range.items[?(@.spec.signerName=="kubernetes.io/kubelet-serving")]}{.metadata.name}{" "}{end}' | xargs kubectl certificate approve |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be automated w/ existing and updated helpers: https://github.com/signalfx/splunk-otel-collector/tree/main/tests/testutils/kubeutils.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We will need this PR or equivalent functionality to use helpers, right now they hardcode v1.26, which is something we modulate on to test different versions of Kubernetes.
e4115bc
to
72faedc
Compare
Let me pause work on this PR while we get #949 squared away. I'll address your feedback in changes there first. |
72faedc
to
910b9fb
Compare
4fc7fbc
to
e792ab0
Compare
OK, this is in a better place now. I can refactor to use helpers now, let me see what I can do. |
259b290
to
9b1f638
Compare
@atoulme looks like the test are failing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @atoulme!
A few follow ups on this PR:
|
This PR is an effort to create a set of tests that can listen to the different data inputs from the chart, and refer to them for testing. The cluster can continuously report data in, and we can use this data to assert based on the deployment.
This test runs against kind with a variety of kubernetes versions.