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

Add IPv6 single cluster #737

Merged
Merged
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
75 changes: 68 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
checkgomod:
uses: networkservicemesh/.github/.github/workflows/checkgomod.yaml@main

### SINGLE CLUSTER
kind:
runs-on: ubuntu-latest
strategy:
Expand Down Expand Up @@ -52,7 +53,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 @@ -68,7 +69,7 @@ jobs:
echo CLUSTER_CIDR="172.18.1.128/25" >> $GITHUB_ENV
- name: Integration tests
run: |
go test -count 1 -timeout 2h10m -race -v -run Single
go test -count 1 -timeout 2h10m -race -v ./tests_single
env:
ARTIFACTS_DIR: ${{ matrix.image }}-logs/${{ matrix.image }}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -77,7 +78,59 @@ 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 }}/tests_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 2h10m -race -v \
./tests_single/basic_test.go \
./tests_single/memory_test.go
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 }}/tests_single/ipv6-logs

### SINGLE CALICO CLUSTER
calico-kind:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -127,7 +180,13 @@ 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 \
./tests_single/basic_test.go \
./tests_single/heal_test.go \
./tests_single/memory_test.go \
./tests_single/observability_test.go \
./tests_single/feature_test.go \
-calico
env:
ARTIFACTS_DIR: calico-logs/${{ env.KUBERNETES_VERSION }}
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -136,7 +195,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 }}/tests_single/calico-logs

### INTERDOMAIN CLUSTER
interdomain-kind:
runs-on: ubuntu-latest
env:
Expand Down Expand Up @@ -175,7 +236,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 ./tests_interdomain
env:
ARTIFACTS_DIR: interdomain-logs
working-directory: ${{ github.workspace }}/src/github.com/${{ github.repository }}
Expand All @@ -187,4 +248,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 }}/tests_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.

62 changes: 0 additions & 62 deletions main_test.go

This file was deleted.

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 interdomain

import (
"testing"

"github.com/stretchr/testify/suite"

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

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

Expand Down
29 changes: 29 additions & 0 deletions tests_single/basic_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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 single

import (
"testing"

"github.com/stretchr/testify/suite"

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

func TestRunBasicSuite(t *testing.T) {
suite.Run(t, new(basic.Suite))
}
37 changes: 12 additions & 25 deletions calico_test.go → tests_single/feature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,46 +14,29 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package main
package single

import (
"flag"
"testing"

"github.com/stretchr/testify/suite"

"github.com/networkservicemesh/integration-tests/suites/basic"
"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/observability"
)

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

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

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

func TestRunObservabilitySuiteCalico(t *testing.T) {
suite.Run(t, new(observability.Suite))
}
var calicoFlag = flag.Bool("calico", false, "selects calico tests")

// Disabled tests:
// Disabled tests for Calico-vpp:
// TestMutually_aware_nses - https://github.com/networkservicemesh/integration-k8s-kind/issues/627
// TestNse_composition - https://github.com/networkservicemesh/integration-k8s-kind/issues/625
// TestVl3_basic - https://github.com/networkservicemesh/integration-k8s-kind/issues/633
// TestVl3_scale_from_zero - https://github.com/networkservicemesh/integration-k8s-kind/issues/633
type featuresSuite struct {
type calicoFeatureSuite struct {
features.Suite
}

func (s *featuresSuite) BeforeTest(suiteName, testName string) {
func (s *calicoFeatureSuite) BeforeTest(suiteName, testName string) {
switch testName {
case
"TestMutually_aware_nses",
Expand All @@ -65,6 +48,10 @@ func (s *featuresSuite) BeforeTest(suiteName, testName string) {
s.Suite.BeforeTest(suiteName, testName)
}

func TestRunFeatureSuiteCalico(t *testing.T) {
suite.Run(t, new(featuresSuite))
func TestRunFeatureSuite(t *testing.T) {
if *calicoFlag {
suite.Run(t, new(calicoFeatureSuite))
} else {
suite.Run(t, new(features.Suite))
}
}
29 changes: 29 additions & 0 deletions tests_single/heal_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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 single

import (
"testing"

"github.com/stretchr/testify/suite"

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

func TestRunHealSuite(t *testing.T) {
suite.Run(t, new(heal.Suite))
}
29 changes: 29 additions & 0 deletions tests_single/k8s_monolith_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// 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 single

import (
"testing"

"github.com/stretchr/testify/suite"

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

func TestK8sMonolithSuite(t *testing.T) {
suite.Run(t, new(k8s_monolith.Suite))
}
Loading