From 29f2589ac995e95f5d62fb966dc18732eb1cb7bd Mon Sep 17 00:00:00 2001 From: Alejandro Ruiz Date: Wed, 17 Jan 2024 13:53:31 +0100 Subject: [PATCH] Remove unnecessary return value --- .github/scripts/run-integration-tests.sh | 6 +++--- internal/cmd/agent/trigger/watcher.go | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/scripts/run-integration-tests.sh b/.github/scripts/run-integration-tests.sh index 3e4a84f147..5e3972c54e 100755 --- a/.github/scripts/run-integration-tests.sh +++ b/.github/scripts/run-integration-tests.sh @@ -2,8 +2,8 @@ set -euxo pipefail -SETUP_ENVTEST_VER=${SETUP_ENVTEST_VER-v0.0.0-20221214170741-69f093833822} -ENVTEST_K8S_VERSION=${ENVTEST_K8S_VERSION-1.25} +SETUP_ENVTEST_VER=${SETUP_ENVTEST_VER-v0.0.0-20240115093953-9e6e3b144a69} +ENVTEST_K8S_VERSION=${ENVTEST_K8S_VERSION-1.28} # install and prepare setup-envtest if ! command -v setup-envtest &> /dev/null @@ -14,4 +14,4 @@ KUBEBUILDER_ASSETS=$(setup-envtest use --use-env -p path $ENVTEST_K8S_VERSION) export KUBEBUILDER_ASSETS # run integration tests -go test ./integrationtests/... +go test ./integrationtests/agent/... diff --git a/internal/cmd/agent/trigger/watcher.go b/internal/cmd/agent/trigger/watcher.go index 1677b9000e..80088de8b4 100644 --- a/internal/cmd/agent/trigger/watcher.go +++ b/internal/cmd/agent/trigger/watcher.go @@ -132,11 +132,10 @@ func (t *Trigger) OnChange(key string, defaultNamespace string, trigger func(), return nil } -func (t *Trigger) storeObjectGeneration(uid types.UID, generation int64) *atomic.Int64 { +func (t *Trigger) storeObjectGeneration(uid types.UID, generation int64) { value := new(atomic.Int64) value.Store(generation) t.seenGenerations.Store(uid, value) - return value } func (t *Trigger) call(gvk schema.GroupVersionKind, obj metav1.Object, deleted bool) {