diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 772b8cbc1..0e6c73830 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -102,11 +102,15 @@ jobs: echo "current-context:" $(kubectl config current-context) echo "environment-kubeconfig:" ${KUBECONFIG} working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }} + - name: Install styx + run: | + go get -v -u github.com/go-pluto/styx - name: Integration tests run: | go test -count 1 -timeout 40m -race -v ./... env: ARTIFACTS_DIR: ${{ matrix.image }}-logs/${{ matrix.image }} + RESULTS_PARENT_DIR: ${{ matrix.image }} working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }} - name: Upload artifacts if: ${{ success() || failure() || cancelled() }} @@ -114,3 +118,9 @@ jobs: with: name: Containers logs path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/${{ matrix.image }}-logs + - name: Upload scalability artifacts + if: ${{ success() || failure() || cancelled() }} + uses: actions/upload-artifact@v2 + with: + name: Scalability test results + path: ${{ github.workspace }}/src/github.com/networkservicemesh/deployments-k8s/examples/scalability/cases/*/${{ matrix.image }}/results-*/ diff --git a/entry_point_test.go b/entry_point_test.go index f1a6071f5..ee0a4a486 100644 --- a/entry_point_test.go +++ b/entry_point_test.go @@ -17,6 +17,8 @@ package test import ( + "io/ioutil" + "strconv" "testing" "github.com/stretchr/testify/suite" @@ -25,6 +27,7 @@ import ( "github.com/networkservicemesh/integration-tests/suites/features" "github.com/networkservicemesh/integration-tests/suites/heal" "github.com/networkservicemesh/integration-tests/suites/memory" + "github.com/networkservicemesh/integration-tests/suites/scalability" ) func TestRunHealSuite(t *testing.T) { @@ -42,3 +45,23 @@ func TestRunBasicSuite(t *testing.T) { func TestRunMemorySuite(t *testing.T) { suite.Run(t, new(memory.Suite)) } + +func setScalabilityTestParams(netsvc, nse, nsc int, remote bool) string { + filename := "../deployments-k8s/examples/scalability/cases/set_params.sh" + filecontent := `#!/bin/bash +TEST_NS_COUNT=` + strconv.Itoa(netsvc) + ` +TEST_NSE_COUNT=` + strconv.Itoa(nse) + ` +TEST_NSC_COUNT=` + strconv.Itoa(nsc) + ` +TEST_REMOTE_CASE=` + strconv.FormatBool(remote) + err := ioutil.WriteFile(filename, []byte(filecontent), 0600) + if err != nil { + panic(err) + } + testName := "ns=" + strconv.Itoa(netsvc) + ",nse=" + strconv.Itoa(nse) + ",nsc=" + strconv.Itoa(nsc) + ",remote=" + strconv.FormatBool(remote) + return testName +} + +func TestRunScalabilitySuite(t *testing.T) { + t.Run("ns=1,nse=1,nsc=1,remote=false", func(t *testing.T) { suite.Run(t, new(scalability.Suite)) }) + t.Run(setScalabilityTestParams(1, 1, 5, true), func(t *testing.T) { suite.Run(t, new(scalability.Suite)) }) +}