Skip to content

Commit

Permalink
Add IPv6 single cluster
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
  • Loading branch information
glazychev-art committed Nov 9, 2022
1 parent d70724a commit 0cba9df
Show file tree
Hide file tree
Showing 9 changed files with 122 additions and 43 deletions.
68 changes: 61 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ 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 )
### SINGLE CLUSTER
kind:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -96,7 +98,7 @@ jobs:
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- uses: engineerd/setup-kind@v0.5.0
with:
config: src/github.com/${{ github.repository }}/${{matrix.image <= 'v1.19.11' && 'cluster-config-old.yaml' || 'cluster-config.yaml'}}
config: src/github.com/${{ github.repository }}/cluster-config.yaml
version: v0.13.0
image: kindest/node:${{ matrix.image }}
- name: Check kind cluster
Expand All @@ -112,7 +114,7 @@ jobs:
echo CLUSTER_CIDR="172.18.1.128/25" >> $GITHUB_ENV
- name: Integration tests
run: |
go test -count 1 -timeout 1h55m -race -v -run Single
go test -count 1 -timeout 1h55m -race -v ./test_single
env:
ARTIFACTS_DIR: ${{ matrix.image }}-logs/${{ matrix.image }}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -121,7 +123,57 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Single logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/${{ matrix.image }}-logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/test_single/${{ matrix.image }}-logs

### SINGLE IPv6 CLUSTER
kind-ipv6:
runs-on: ubuntu-latest
env:
KUBERNETES_VERSION: "v1.25.0"
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.9.0
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/setup-kind@v0.5.0
with:
config: src/github.com/${{ github.repository }}/cluster-config-ipv6.yaml
version: v0.13.0
image: kindest/node:${{ env.KUBERNETES_VERSION }}
- name: Check kind cluster
run: |
kubectl version
kubectl get pods -A -o wide
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Set loadbalancer CIDR
run: |
echo CLUSTER_CIDR="fc00:f853:ccd:e793:1::/80" >> $GITHUB_ENV
- name: Integration tests
run: |
go test -count 1 -timeout 1h55m -race -v ./test_single_ipv6
env:
ARTIFACTS_DIR: ipv6-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: Single IPv6 logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/test_single_ipv6/ipv6-logs

### SINGLE CALICO CLUSTER
calico-kind:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -171,7 +223,7 @@ jobs:
- name: Integration tests
continue-on-error: true
run: |
go test -count 1 -timeout 1h30m -race -v -run Calico
go test -count 1 -timeout 1h30m -race -v ./test_calico
env:
ARTIFACTS_DIR: calico-logs/${{ env.KUBERNETES_VERSION }}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -180,7 +232,9 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Calico logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/calico-logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/test_calico/calico-logs

### INTERDOMAIN CLUSTER
interdomain-kind:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -219,7 +273,7 @@ jobs:
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
- name: Interdomain tests
run: |
go test -count 1 -timeout 1h -race -v -run Interdomain
go test -count 1 -timeout 1h -race -v ./test_interdomain
env:
ARTIFACTS_DIR: interdomain-logs
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -231,4 +285,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Interdomain logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/interdomain-logs
path: ${{ github.workspace }}/src/github.com/${{ github.repository }}/test_interdomain/interdomain-logs
9 changes: 9 additions & 0 deletions cluster-config-ipv6.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
ipFamily: ipv6
nodes:
- role: control-plane
- role: worker
- role: worker
17 changes: 0 additions & 17 deletions cluster-config-old.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.16

require (
github.com/googleapis/gnostic v0.5.1 // indirect
github.com/networkservicemesh/integration-tests v0.0.0-20221023172725-a239c379e3bd
github.com/networkservicemesh/integration-tests v0.0.0-20221031134456-995be482ed4f
github.com/stretchr/testify v1.7.0
gopkg.in/yaml.v2 v2.4.0 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ 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-20221023172725-a239c379e3bd h1:Tj3omiENebPFKr2bASNEeDBGTtxblcRum9U79uXzfPA=
github.com/networkservicemesh/integration-tests v0.0.0-20221023172725-a239c379e3bd/go.mod h1:FiN76Emti1ZyhWMIG6vg6kXG//0wSCoKokBvp6i8bjM=
github.com/networkservicemesh/integration-tests v0.0.0-20221031134456-995be482ed4f h1:goudmK+rs0ERD0tFxinRz4W20W5PVtpEFH1OeTwZ1/4=
github.com/networkservicemesh/integration-tests v0.0.0-20221031134456-995be482ed4f/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
12 changes: 6 additions & 6 deletions calico_test.go → test_calico/calico_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package main
package main_test

import (
"testing"
Expand All @@ -28,19 +28,19 @@ import (
"github.com/networkservicemesh/integration-tests/suites/observability"
)

func TestRunHealSuiteCalico(t *testing.T) {
func TestRunHealSuite(t *testing.T) {
suite.Run(t, new(heal.Suite))
}

func TestRunBasicSuiteCalico(t *testing.T) {
func TestRunBasicSuite(t *testing.T) {
suite.Run(t, new(basic.Suite))
}

func TestRunMemorySuiteCalico(t *testing.T) {
func TestRunMemorySuite(t *testing.T) {
suite.Run(t, new(memory.Suite))
}

func TestRunObservabilitySuiteCalico(t *testing.T) {
func TestRunObservabilitySuite(t *testing.T) {
suite.Run(t, new(observability.Suite))
}

Expand All @@ -65,6 +65,6 @@ func (s *featuresSuite) BeforeTest(suiteName, testName string) {
s.Suite.BeforeTest(suiteName, testName)
}

func TestRunFeatureSuiteCalico(t *testing.T) {
func TestRunFeatureSuite(t *testing.T) {
suite.Run(t, new(featuresSuite))
}
3 changes: 1 addition & 2 deletions interdomain_test.go → test_interdomain/interdomain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package main
package main_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/networkservicemesh/integration-tests/suites/floating_interdomain"

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

Expand Down
16 changes: 8 additions & 8 deletions main_test.go → test_single/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package main
package main_test

import (
"testing"
Expand All @@ -33,30 +33,30 @@ import (
"github.com/networkservicemesh/integration-tests/suites/remotevlan"
)

func TestRunHealSuiteSingle(t *testing.T) {
func TestRunHealSuite(t *testing.T) {
suite.Run(t, new(heal.Suite))
}

func TestRunFeatureSuiteSingle(t *testing.T) {
func TestRunFeatureSuite(t *testing.T) {
suite.Run(t, new(features.Suite))
}

func TestRunBasicSuiteSingle(t *testing.T) {
func TestRunBasicSuite(t *testing.T) {
suite.Run(t, new(basic.Suite))
}

func TestRunMemorySuiteSingle(t *testing.T) {
func TestRunMemorySuite(t *testing.T) {
suite.Run(t, new(memory.Suite))
}

func TestRunRvlanSuiteSingle(t *testing.T) {
func TestRunRvlanSuite(t *testing.T) {
suite.Run(t, new(remotevlan.Suite))
}

func TestRunObservabilitySuiteSingle(t *testing.T) {
func TestRunObservabilitySuite(t *testing.T) {
suite.Run(t, new(observability.Suite))
}

func TestK8sMonolithSuiteSingle(t *testing.T) {
func TestK8sMonolithSuite(t *testing.T) {
suite.Run(t, new(k8s_monolith.Suite))
}
34 changes: 34 additions & 0 deletions test_single_ipv6/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
// Copyright (c) 2022 Cisco and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
// 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.

package main_test

import (
"testing"

"github.com/stretchr/testify/suite"

"github.com/networkservicemesh/integration-tests/suites/basic"
"github.com/networkservicemesh/integration-tests/suites/memory"
)

func TestRunBasicSuite(t *testing.T) {
suite.Run(t, new(basic.Suite))
}

func TestRunMemorySuite(t *testing.T) {
suite.Run(t, new(memory.Suite))
}

0 comments on commit 0cba9df

Please sign in to comment.