Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,25 @@ 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() }}
uses: actions/upload-artifact@v2
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-*/
23 changes: 23 additions & 0 deletions entry_point_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
package test

import (
"io/ioutil"
"strconv"
"testing"

"github.com/stretchr/testify/suite"
Expand All @@ -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) {
Expand All @@ -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)) })
}