-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: add e2e test cases for hypernode
Signed-off-by: xuwentao <cutenear1993@yahoo.com>
- Loading branch information
Showing
11 changed files
with
498 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: E2E Hypernode | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
pull_request: | ||
|
||
jobs: | ||
e2e_hypernode: | ||
runs-on: ubuntu-24.04 | ||
name: E2E about Hypernode | ||
timeout-minutes: 40 | ||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.22.x | ||
|
||
- name: Install musl | ||
run: | | ||
wget http://musl.libc.org/releases/musl-1.2.1.tar.gz | ||
tar -xf musl-1.2.1.tar.gz && cd musl-1.2.1 | ||
./configure | ||
make && sudo make install | ||
- uses: actions/cache@v2 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
|
||
- name: Install dependences | ||
run: | | ||
GO111MODULE="on" go install sigs.k8s.io/kind@v0.24.0 | ||
curl -LO https://storage.googleapis.com/kubernetes-release/release/v1.31.0/bin/linux/amd64/kubectl && sudo install kubectl /usr/local/bin/kubectl | ||
- name: Install kwok | ||
run: | | ||
helm repo add kwok https://kwok.sigs.k8s.io/charts/ | ||
helm repo update | ||
helm --install --namespace kube-system kwok kwok/kwok | ||
helm --install kwok kwok/stage-fast | ||
# delete pod-complete stage to avoid volcano-job-pod change status to complete. | ||
kubectl delete stage pod-complete | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Run E2E Tests | ||
run: | | ||
export ARTIFACTS_PATH=${{ github.workspace }}/e2e-hypernode-logs | ||
make e2e-test-hypernode CC=/usr/local/musl/bin/musl-gcc | ||
- name: Upload e2e hypernode logs | ||
if: failure() | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: volcano_e2e_hypernode_logs | ||
path: ${{ github.workspace }}/e2e-hypernode-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
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,13 @@ | ||
package hypernode | ||
|
||
import ( | ||
"testing" | ||
|
||
. "github.com/onsi/ginkgo/v2" | ||
. "github.com/onsi/gomega" | ||
) | ||
|
||
func TestE2E(t *testing.T) { | ||
RegisterFailHandler(Fail) | ||
RunSpecs(t, "Volcano Network Topology Test Suite") | ||
} |
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,21 @@ | ||
package hypernode | ||
|
||
import ( | ||
"os" | ||
"testing" | ||
|
||
"k8s.io/client-go/kubernetes" | ||
"k8s.io/client-go/tools/clientcmd" | ||
|
||
vcclient "volcano.sh/apis/pkg/client/clientset/versioned" | ||
e2eutil "volcano.sh/volcano/test/e2e/util" | ||
) | ||
|
||
func TestMain(m *testing.M) { | ||
home := e2eutil.HomeDir() | ||
configPath := e2eutil.KubeconfigPath(home) | ||
config, _ := clientcmd.BuildConfigFromFlags(e2eutil.MasterURL(), configPath) | ||
e2eutil.VcClient = vcclient.NewForConfigOrDie(config) | ||
e2eutil.KubeClient = kubernetes.NewForConfigOrDie(config) | ||
os.Exit(m.Run()) | ||
} |
Oops, something went wrong.