Skip to content
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

Draft: Add run for tests nsm_istio and nsm_consul interdomain examples #691

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
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
234 changes: 117 additions & 117 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,122 +65,122 @@ jobs:
run: |
git diff --name-only --exit-code go.mod || ( echo "Run go tidy" && false )
git diff --name-only --exit-code go.sum || ( echo "Run go tidy" && false )
kind:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
image:
- v1.24.0
- v1.23.0
- v1.22.1
- v1.21.1
- v1.20.7
- v1.19.11
- v1.18.15
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-go@v1
with:
go-version: 1.16
github-token: ${{ github.token }}
- name: Set go env
run: |
echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
echo GO111MODULE=on >> $GITHUB_ENV
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- uses: engineerd/[email protected]
with:
config: src/github.com/${{ github.repository }}/${{matrix.image <= 'v1.19.11' && 'cluster-config-old.yaml' || 'cluster-config.yaml'}}
version: v0.13.0
image: kindest/node:${{ matrix.image }}
- name: Check kind cluster
run: |
kubectl version
kubectl cluster-info
kubectl get pods -n kube-system
echo "current-context:" $(kubectl config current-context)
echo "environment-kubeconfig:" ${KUBECONFIG}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Set loadbalancer CIDR
run: |
echo CLUSTER_CIDR="172.18.1.128/25" >> $GITHUB_ENV
- name: Integration tests
run: |
go test -count 1 -timeout 1h30m -race -v -run Single
env:
ARTIFACTS_DIR: ${{ matrix.image }}-logs/${{ 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: Single logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/${{ matrix.image }}-logs
calico-kind:
runs-on: ubuntu-latest
env:
KUBERNETES_VERSION: ${{ secrets.NSM_KUBERNETES_VERSION }}
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/setup-go@v1
with:
go-version: 1.16
github-token: ${{ github.token }}
- name: Set go env
run: |
echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
echo GO111MODULE=on >> $GITHUB_ENV
echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
- name: Set kubernetes version
run: |
if [[ $KUBERNETES_VERSION=="" ]]; then
echo "KUBERNETES_VERSION=v1.22.1" >> $GITHUB_ENV
fi
- uses: actions/checkout@v2
with:
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- uses: engineerd/[email protected]
with:
config: src/github.com/${{ github.repository }}/cluster-config-calico.yaml
version: v0.11.1
image: kindest/node:${{ env.KUBERNETES_VERSION }}
wait: 0s
- name: Setup external CNI plugin
run: |
kubectl apply -f https://projectcalico.docs.tigera.io/archive/v3.23/manifests/tigera-operator.yaml
kubectl apply -f https://raw.githubusercontent.com/projectcalico/vpp-dataplane/v3.23.0/yaml/calico/installation-default.yaml
kubectl apply -k ${{ github.workspace }}/src/github.com/${{ github.repository }}/calico
kubectl rollout status -n calico-vpp-dataplane ds/calico-vpp-node --timeout=5m
- name: Check kind cluster
run: |
kubectl version
kubectl cluster-info
kubectl get pods --all-namespaces
echo "current-context:" $(kubectl config current-context)
echo "environment-kubeconfig:" ${KUBECONFIG}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Integration tests
run: |
go test -count 1 -timeout 1h30m -race -v -run Calico
env:
ARTIFACTS_DIR: calico-logs/${{ env.KUBERNETES_VERSION }}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Upload artifacts
if: ${{ success() || failure() || cancelled() }}
uses: actions/upload-artifact@v2
with:
name: Calico logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/calico-logs
# kind:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# image:
# - v1.24.0
# - v1.23.0
# - v1.22.1
# - v1.21.1
# - v1.20.7
# - v1.19.11
# - v1.18.15
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
# - uses: actions/setup-go@v1
# with:
# go-version: 1.16
# github-token: ${{ github.token }}
# - name: Set go env
# run: |
# echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
# echo GO111MODULE=on >> $GITHUB_ENV
# echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
# - uses: actions/checkout@v2
# with:
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - uses: engineerd/[email protected]
# with:
# config: src/github.com/${{ github.repository }}/${{matrix.image <= 'v1.19.11' && 'cluster-config-old.yaml' || 'cluster-config.yaml'}}
# version: v0.13.0
# image: kindest/node:${{ matrix.image }}
# - name: Check kind cluster
# run: |
# kubectl version
# kubectl cluster-info
# kubectl get pods -n kube-system
# echo "current-context:" $(kubectl config current-context)
# echo "environment-kubeconfig:" ${KUBECONFIG}
# working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - name: Set loadbalancer CIDR
# run: |
# echo CLUSTER_CIDR="172.18.1.128/25" >> $GITHUB_ENV
# - name: Integration tests
# run: |
# go test -count 1 -timeout 1h30m -race -v -run Single
# env:
# ARTIFACTS_DIR: ${{ matrix.image }}-logs/${{ 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: Single logs
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/${{ matrix.image }}-logs
# calico-kind:
# runs-on: ubuntu-latest
# env:
# KUBERNETES_VERSION: ${{ secrets.NSM_KUBERNETES_VERSION }}
# steps:
# - name: Cancel Previous Runs
# uses: styfle/[email protected]
# with:
# access_token: ${{ github.token }}
# - uses: actions/setup-go@v1
# with:
# go-version: 1.16
# github-token: ${{ github.token }}
# - name: Set go env
# run: |
# echo GOPATH=$GITHUB_WORKSPACE >> $GITHUB_ENV
# echo GO111MODULE=on >> $GITHUB_ENV
# echo $GITHUB_WORKSPACE/bin >> $GITHUB_PATH
# - name: Set kubernetes version
# run: |
# if [[ $KUBERNETES_VERSION=="" ]]; then
# echo "KUBERNETES_VERSION=v1.22.1" >> $GITHUB_ENV
# fi
# - uses: actions/checkout@v2
# with:
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - uses: engineerd/[email protected]
# with:
# config: src/github.com/${{ github.repository }}/cluster-config-calico.yaml
# version: v0.11.1
# image: kindest/node:${{ env.KUBERNETES_VERSION }}
# wait: 0s
# - name: Setup external CNI plugin
# run: |
# kubectl apply -f https://projectcalico.docs.tigera.io/archive/v3.23/manifests/tigera-operator.yaml
# kubectl apply -f https://raw.githubusercontent.com/projectcalico/vpp-dataplane/v3.23.0/yaml/calico/installation-default.yaml
# kubectl apply -k ${{ github.workspace }}/src/github.com/${{ github.repository }}/calico
# kubectl rollout status -n calico-vpp-dataplane ds/calico-vpp-node --timeout=5m
# - name: Check kind cluster
# run: |
# kubectl version
# kubectl cluster-info
# kubectl get pods --all-namespaces
# echo "current-context:" $(kubectl config current-context)
# echo "environment-kubeconfig:" ${KUBECONFIG}
# working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - name: Integration tests
# run: |
# go test -count 1 -timeout 1h30m -race -v -run Calico
# env:
# ARTIFACTS_DIR: calico-logs/${{ env.KUBERNETES_VERSION }}
# working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
# - name: Upload artifacts
# if: ${{ success() || failure() || cancelled() }}
# uses: actions/upload-artifact@v2
# with:
# name: Calico logs
# path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/calico-logs
interdomain-kind:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
if [[ $KUBERNETES_VERSION=="" ]]; then
KUBERNETES_VERSION="v1.22.1"
fi
for (( i = 1; i <= 3; i++ )); do
for (( i = 1; i <= 2; i++ )); do
kind create cluster --name "kind-${i}" --config cluster-config-interdomain.yaml --image="kindest/node:$KUBERNETES_VERSION"
configPath=${{ github.workspace }}/src/github.com/${{ github.repository }}/config${i}
kind get kubeconfig --name "kind-${i}" > ${configPath}
Expand Down
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@ require (
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v2 v2.4.0 // indirect
)

replace github.com/networkservicemesh/integration-tests => github.com/anastasia-malysheva/integration-tests v0.0.0-20220704101527-59c943b4e5c7
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym
github.com/NYTimes/gziphandler v0.0.0-20170623195520-56545f4a5d46/go.mod h1:3wb06e3pkSAbeQ52E9H9iFoQsEEwGN64994WTCIhntQ=
github.com/PuerkitoBio/purell v1.1.1/go.mod h1:c11w/QuzBsJSee3cPx9rAFu61PvFxuPbtSwDGJws/X0=
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578/go.mod h1:uGdkoq3SwY9Y+13GIhn11/XLaGBb4BfwItxLd5jeuXE=
github.com/anastasia-malysheva/integration-tests v0.0.0-20220704101527-59c943b4e5c7 h1:yoj5lCISoBvbNLEC49wHFnWTLLs/W6DwnRGcYRg3X50=
github.com/anastasia-malysheva/integration-tests v0.0.0-20220704101527-59c943b4e5c7/go.mod h1:FiN76Emti1ZyhWMIG6vg6kXG//0wSCoKokBvp6i8bjM=
github.com/asaskevich/govalidator v0.0.0-20190424111038-f61b66f89f4a/go.mod h1:lB+ZfQJz7igIIfQNfa7Ml4HSf2uFQQRzpGGRXenZAgY=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
Expand Down Expand Up @@ -158,8 +160,6 @@ github.com/munnerz/goautoneg v0.0.0-20120707110453-a547fc61f48d/go.mod h1:+n7T8m
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw=
github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc h1:1L/OisEFsOyhwaqeJpYmM1nlJ2dBusUMiszPDBlUip0=
github.com/networkservicemesh/gotestmd v0.0.0-20220628095933-eabbdc09e0dc/go.mod h1:8EWnekTRNX+NxBdTFE24WqUoM7SgJHbiafDBrIIdOmQ=
github.com/networkservicemesh/integration-tests v0.0.0-20220630180902-d40e579e8702 h1:ngUVtEkKMeZrNDdSEfg8sIAC7Xx87eEgoAKpKU/KZOw=
github.com/networkservicemesh/integration-tests v0.0.0-20220630180902-d40e579e8702/go.mod h1:FiN76Emti1ZyhWMIG6vg6kXG//0wSCoKokBvp6i8bjM=
github.com/onsi/ginkgo v0.0.0-20170829012221-11459a886d9c/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.11.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
Expand Down
11 changes: 8 additions & 3 deletions interdomain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,14 @@ import (

"github.com/stretchr/testify/suite"

"github.com/networkservicemesh/integration-tests/suites/interdomain"
// "github.com/networkservicemesh/integration-tests/suites/interdomain"
"github.com/networkservicemesh/integration-tests/suites/basic_interdomain"
)

func TestRunInterdomainSuite(t *testing.T) {
suite.Run(t, new(interdomain.Suite))
// func TestRunInterdomainSuite(t *testing.T) {
// suite.Run(t, new(interdomain.Suite))
//}

func TestRunBasicInterdomainSuite(t *testing.T) {
suite.Run(t, new(basic_interdomain.Suite))
}