forked from kubernetes-retired/kpng
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
implementation of local e2e-tests (kubernetes-retired#121)
* e2e more minor refactoring delete github actions with sonobuoy init test_e2e.sh add e2e tests added few e2e fns and main.sh Signed-off-by: Neha Lohia <[email protected]> adding local tests add _artifacts to gitignore fix daemonset invalid char issue Signed-off-by: Neha Lohia <[email protected]> x fix ginkgo binary executable issue Signed-off-by: Neha Lohia <[email protected]> enabling proper iteration over backends and ipfamilies fixing trouble with missing kubeconf add input args for ipfamily and backend Signed-off-by: Neha Lohia <[email protected]> removed history file Signed-off-by: Neha Lohia <[email protected]> add e2e in github actions Signed-off-by: Neha Lohia <[email protected]> add e2e in github actions2 Signed-off-by: Neha Lohia <[email protected]> fix github actions issues Signed-off-by: Neha Lohia <[email protected]> fix github actions issues 2 Signed-off-by: Neha Lohia <[email protected]> fix github actions issues 3 Signed-off-by: Neha Lohia <[email protected]> fix github actions issues 4 Signed-off-by: Neha Lohia <[email protected]> refactor according to review test change Signed-off-by: Neha Lohia <[email protected]> further improvements Add help for ci mode Improve help for ci mode Fix ci mode Fix export of logs to wrong dir Fix script not properly failing fix export of logs for failing tests fix more fixes remove debug messages * Make failing tests not fail in gh actions, to remove blockers * echo hint on failing tests
- Loading branch information
1 parent
712beea
commit a3cf2e3
Showing
12 changed files
with
476 additions
and
32 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
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 |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: e2e tests | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
GO_VERSION: "1.17.3" | ||
|
||
jobs: | ||
setup: | ||
name: setup | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
id: go | ||
|
||
- name: Install dependencies | ||
run: | | ||
go version | ||
go get -u golang.org/x/lint/golint | ||
e2e: | ||
name: e2e | ||
needs: setup | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 100 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
ipFamily: ["ipv4", "ipv6", "dual"] | ||
backend: ["iptables", "nft", "ipvs"] | ||
env: | ||
JOB_NAME: "kpng-e2e-${{ matrix.ipFamily }}-${{ matrix.backend }}" | ||
IP_FAMILY: ${{ matrix.ipFamily }} | ||
BACKEND: ${{ matrix.backend }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: run e2e tests | ||
run: ./hack/test_e2e.sh -i ${{ env.IP_FAMILY }} -b ${{ env.BACKEND }} -c | ||
|
||
- name: Export logs | ||
if: always() | ||
run: | | ||
./hack/e2e_export_logs.sh | ||
- name: Upload Junit Reports | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: kind-junit-${{ env.JOB_NAME }}-${{ github.run_id }} | ||
path: './hack/temp/e2e/artifacts/reports/*.xml' | ||
|
||
- name: Upload logs | ||
if: always() | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: kind-logs-${{ env.JOB_NAME }}-${{ github.run_id }} | ||
path: ./hack/temp/e2e/artifacts/logs/ | ||
|
||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v2 | ||
if: always() | ||
with: | ||
report_paths: './hack/temp/e2e/artifacts/reports/*.xml' |
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
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
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
kpng-deployment-ds.yaml | ||
/sonobuoy | ||
/sonobuoy | ||
/temp | ||
/_artifacts |
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2021 The Kubernetes Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
# this script is for ci | ||
# if the test_e2e.sh fails, the logs still need to be exportet | ||
|
||
set -e | ||
pushd "${0%/*}" > /dev/null | ||
E2E_DIR="$(pwd)/temp/e2e/" | ||
popd > /dev/null | ||
E2E_FILE="${E2E_DIR}/clustername" | ||
E2E_LOGS="${E2E_DIR}/artifacts/logs" | ||
kind export logs --name="$(cat $E2E_FILE)" --loglevel="debug" "${E2E_LOGS}" |
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
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
Oops, something went wrong.