Skip to content
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
39 changes: 39 additions & 0 deletions .github/workflows/test-gnmi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# SPDX-FileCopyrightText: 2026 SAP SE or an SAP affiliate company and IronCore contributors
# SPDX-License-Identifier: Apache-2.0

name: Test gNMI integration

on:
pull_request:
branches:
- main
paths:
- '**.go'
- 'hack/**'
- 'config/**'
- 'go.mod'
- 'go.sum'
- 'Makefile'

permissions:
contents: read

jobs:
test-gnmi:
name: gNMI Integration (${{ matrix.provider }})
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
provider:
- openconfig
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v6
with:
go-version-file: 'go.mod'
- name: Install ginkgo
run: go install github.com/onsi/ginkgo/v2/ginkgo@latest
- name: Running gNMI tests
run: make test-gnmi PROVIDER=${{ matrix.provider }} GINKGO_PROCS=$(nproc)

9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,14 @@ test-e2e: setup-test-e2e manifests generate ## Run the e2e tests. Expected an is
cleanup-test-e2e: ## Tear down the Kind cluster used for e2e tests
@$(KIND) delete cluster --name $(KIND_CLUSTER)

# Number of parallel Ginkgo processes
GINKGO_PROCS ?= $(shell nproc 2>/dev/null || sysctl -n hw.logicalcpu)

.PHONY: test-gnmi
test-gnmi: FORCE ## Run integration tests for gNMI.
@printf "\e[1;33m>> gNMI integration tests not yet implemented\e[0m\n"
test-gnmi: ## Run gNMI integration tests
@if ! hash setup-envtest 2>/dev/null; then printf "\e[1;36m>> Installing setup-envtest...\e[0m\n"; go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest; fi
@printf "\e[1;36m>> ginkgo run --procs=$(GINKGO_PROCS) ./test/gnmi/ (PROVIDER=$(PROVIDER))\e[0m\n"
@KUBEBUILDER_ASSETS=$$(setup-envtest use 1.32 -p path) PROVIDER=$(PROVIDER) ginkgo run --tags=gnmi --procs=$(GINKGO_PROCS) ./test/gnmi/

.PHONY: test-lab
test-lab: ## Run lab tests against a real network device.
Expand Down
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/ironcore-dev/network-operator
go 1.26.0

require (
github.com/benjamintf1/unmarshalledmatchers v1.0.0
github.com/felix-kaestner/copy v0.0.0-20250930112410-8fbc5c5b74a5
github.com/go-crypt/crypt v0.14.15
github.com/go-logr/logr v1.4.4
Expand All @@ -19,6 +20,7 @@ require (
go.uber.org/automaxprocs v1.6.0
go.uber.org/zap v1.28.0
golang.org/x/crypto v0.54.0
golang.org/x/tools v0.48.0
google.golang.org/grpc v1.82.1
google.golang.org/protobuf v1.36.12-0.20260120151049-f2248ac996af
k8s.io/api v0.36.0
Expand Down Expand Up @@ -108,12 +110,12 @@ require (
golang.org/x/term v0.45.0 // indirect
golang.org/x/text v0.40.0 // indirect
golang.org/x/time v0.15.0 // indirect
golang.org/x/tools v0.48.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20260414002931-afd174a4e478 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260414002931-afd174a4e478 // indirect
gopkg.in/evanphx/json-patch.v4 v4.13.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/apiextensions-apiserver v0.36.0 // indirect
k8s.io/apiserver v0.36.0 // indirect
Expand Down
50 changes: 50 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading