-
Notifications
You must be signed in to change notification settings - Fork 99
E2E Test #56
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
E2E Test #56
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,31 @@ | ||||||
| name: Run tests | ||||||
|
|
||||||
| on: [ push, pull_request ] | ||||||
|
|
||||||
| permissions: | ||||||
| contents: read | ||||||
|
|
||||||
| jobs: | ||||||
| e2e: | ||||||
| runs-on: ubuntu-latest | ||||||
| steps: | ||||||
| - name: Install Go | ||||||
| uses: actions/setup-go@v4 | ||||||
| with: | ||||||
| go-version: 1.22.6 | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v3 | ||||||
| - name: Update vendor modules | ||||||
| run: go mod vendor | ||||||
| - name: Build | ||||||
| run: make PREFIX=artifacts cmds | ||||||
| - name: install helm and kubelet | ||||||
|
||||||
| - name: install helm and kubelet | |
| - name: install helm and kubectl |
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.
Do we not need to also install kind?
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.
Surprisingly not.
kannon92 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright 2024 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. | ||
| # | ||
| # stop at first failure to save time | ||
| set -e | ||
|
|
||
| bash demo/build-driver.sh | ||
kannon92 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| bash demo/create-cluster.sh | ||
| helm upgrade -i \ | ||
| --create-namespace \ | ||
| --namespace dra-example-driver \ | ||
| dra-example-driver \ | ||
| deployments/helm/dra-example-driver | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| # Copyright 2024 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. | ||
|
|
||
| # Very Simple Script for testing the demo | ||
|
|
||
| kubectl create -f demo/gpu-test1.yaml | ||
kannon92 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| kubectl create -f demo/gpu-test2.yaml | ||
| kubectl create -f demo/gpu-test3.yaml | ||
| kubectl create -f demo/gpu-test4.yaml | ||
| kubectl create -f demo/gpu-test5.yaml | ||
| sleep 30 | ||
|
|
||
| gpu_test_1=$(kubectl get pods -n gpu-test1 | grep -c 'Running') | ||
| if [ $gpu_test_1 != 2 ]; then | ||
| echo "gpu_test_1 $gpu_test_1 failed to match against 2 expected pods" | ||
| exit 1 | ||
| fi | ||
|
Comment on lines
+26
to
+
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should also check for the existence of |
||
|
|
||
| gpu_test_2=$(kubectl get pods -n gpu-test2 | grep -c 'Running') | ||
| if [ $gpu_test_2 != 1 ]; then | ||
| echo "gpu_test_2 $gpu_test_2 failed to match against 1 expected pod" | ||
| exit 1 | ||
| fi | ||
|
|
||
| gpu_test_3=$(kubectl get pods -n gpu-test3 | grep -c 'Running') | ||
| if [ $gpu_test_3 != 1 ]; then | ||
| echo "gpu_test_3 $gpu_test_3 failed to match against 1 expected pod" | ||
| exit 1 | ||
| fi | ||
|
|
||
| gpu_test_4=$(kubectl get pods -n gpu-test4 | grep -c 'Running') | ||
| if [ $gpu_test_4 != 2 ]; then | ||
| echo "gpu_test_4 $gpu_test_4 failed to match against 1 expected pods" | ||
| exit 1 | ||
| fi | ||
|
|
||
| gpu_test_5=$(kubectl get pods -n gpu-test5 | grep -c 'Running') | ||
| if [ $gpu_test_5 != 1 ]; then | ||
| echo "gpu_test_5 $gpu_test_5 failed to match against 1 expected pod" | ||
| exit 1 | ||
| fi | ||
|
|
||
| echo "test ran successfully" | ||
Uh oh!
There was an error while loading. Please reload this page.