-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
aa593af
commit 12c8bba
Showing
2 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,15 +119,26 @@ jobs: | |
|
||
|
||
integration: | ||
name: Integration and e2e tests | ||
name: Integration and E2E tests | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
k8sVersion: [ "v1.28.3", "v1.27.5", "v1.26.8", "v1.25.13", "v1.24.17"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: 'go.mod' | ||
- uses: helm/[email protected] | ||
|
||
- name: Kind action | ||
uses: helm/[email protected] | ||
with: | ||
kubectl_version: ${{ matrix.k8sVersion }} | ||
|
||
- name: Create k8s Kind Cluster | ||
run: make kind-up | ||
|
@@ -158,9 +169,35 @@ jobs: | |
--values values-dev.yaml --values values-local.yaml \ | ||
--wait --timeout 240s | ||
- name: Run e2e tests | ||
run: make test-e2e | ||
- name: Confirm external.metrics.k8s.io API implementation details | ||
env: | ||
ENDPOINT: '/apis/external.metrics.k8s.io/v1beta1/namespaces/*/e2e/' | ||
KUBECONFIG: ./kubeconfig # Generated by `make kind-up` | ||
run: | | ||
sleep 30 | ||
KIND=$(kubectl get --raw "${ENDPOINT}" | jq '.kind') | ||
API_VERSION=$(kubectl get --raw "${ENDPOINT}" | jq '.apiVersion') | ||
METRIC_NAME=$(kubectl get --raw "${ENDPOINT}" | jq '.items[0].metricName') | ||
VALUE=$(kubectl get --raw "${ENDPOINT}" | jq '.items[0].value') | ||
if [[ ${KIND} != '"ExternalMetricValueList"' ]]; then | ||
echo "KIND: found '${KIND}' != expected '\"ExternalMetricValueList\"'" | ||
exit 1 | ||
fi | ||
if [[ ${API_VERSION} != '"external.metrics.k8s.io/v1beta1"' ]]; then | ||
echo "API_VERSION: found '${API_VERSION}' != expected '\"external.metrics.k8s.io/v1beta1\"'" | ||
exit 1 | ||
fi | ||
if [[ ${METRIC_NAME} != '"e2e"' ]]; then | ||
echo "METRIC_NAME: found '${METRIC_NAME}' != expected '\"e2e\"'" | ||
exit 1 | ||
fi | ||
if [[ ${VALUE} != '"123m"' ]]; then | ||
echo "VALUE: found '${VALUE}' != expected '\"123m\"'" | ||
exit 1 | ||
fi | ||
- name: Run E2E tests | ||
run: make test-e2e | ||
|
||
static-analysis: | ||
name: Static analysis and linting | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters