Skip to content

Commit

Permalink
Fix bazel test invocation
Browse files Browse the repository at this point in the history
Update k8s.io/util to newer version
Manually update tests for gcp-controller-manager
  • Loading branch information
jprzychodzen committed Jul 8, 2022
1 parent e312424 commit 01d284c
Show file tree
Hide file tree
Showing 10 changed files with 105 additions and 17 deletions.
3 changes: 2 additions & 1 deletion cmd/gcp-controller-manager/istiod_csr_approver_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"testing"
Expand Down Expand Up @@ -234,7 +235,7 @@ func TestIstiodApproverHandle(t *testing.T) {
}

csr := makeFancyTestCSR(t, tc.csr)
if err := approver.handle(csr); err != nil {
if err := approver.handle(context.TODO(), csr); err != nil {
t.Fatal(err)
}
tc.verifyActions(t, client.Actions())
Expand Down
3 changes: 2 additions & 1 deletion cmd/gcp-controller-manager/node_csr_approver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package main

import (
"bytes"
"context"
"crypto"
"crypto/ecdsa"
"crypto/elliptic"
Expand Down Expand Up @@ -287,7 +288,7 @@ func TestNodeApproverHandle(t *testing.T) {
validators: []csrValidator{validator},
}
csr := makeTestCSR(t)
if err := approver.handle(csr); err != nil && !c.err {
if err := approver.handle(context.TODO(), csr); err != nil && !c.err {
t.Errorf("unexpected err: %v", err)
}
c.verifyActions(t, client.Actions())
Expand Down
3 changes: 2 additions & 1 deletion cmd/gcp-controller-manager/oidc_csr_approver_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"context"
"crypto/ecdsa"
"crypto/elliptic"
"net"
Expand Down Expand Up @@ -203,7 +204,7 @@ func TestOIDCApproverHandle(t *testing.T) {
}

csr := makeFancyTestCSR(t, tc.csr)
if err := approver.handle(csr); err != nil {
if err := approver.handle(context.TODO(), csr); err != nil {
t.Fatal(err)
}
tc.verifyActions(t, client.Actions())
Expand Down
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -187,5 +187,4 @@ replace (
k8s.io/mount-utils => k8s.io/mount-utils v0.24.2
k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.2
k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.2
k8s.io/utils => k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
)
5 changes: 4 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -902,8 +902,11 @@ k8s.io/mount-utils v0.24.2/go.mod h1:XrSqB3a2e8sq+aU+rlbcBtQ3EgcuDk5RP9ZsGxjoDrI
k8s.io/pod-security-admission v0.24.2/go.mod h1:znnuDHWWWvh/tpbYYPwTsd4y//qHi3cOX+wGxET/mMI=
k8s.io/sample-apiserver v0.24.2/go.mod h1:mf8qgDdu450wqpCJOkSAmoTgU4PIMAcfa5uTBwmJekE=
k8s.io/system-validators v1.7.0/go.mod h1:gP1Ky+R9wtrSiFbrpEPwWMeYz9yqyy1S/KOh0Vci7WI=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 h1:Mx0aa+SUAcNRQbs5jUzV8lkDlGFU8laZsY9jrcVX5SY=
k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20210930125809-cb0fa318a74b/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 h1:HNSDgDCrr/6Ly3WEGKZftiE7IY19Vz2GdbOCyI4qqhc=
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand Down
27 changes: 27 additions & 0 deletions vendor/k8s.io/utils/clock/clock.go

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

42 changes: 36 additions & 6 deletions vendor/k8s.io/utils/clock/testing/fake_clock.go

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

4 changes: 2 additions & 2 deletions vendor/k8s.io/utils/lru/lru.go

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

31 changes: 29 additions & 2 deletions vendor/k8s.io/utils/pointer/pointer.go

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

3 changes: 1 addition & 2 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ k8s.io/metrics/pkg/apis/metrics
k8s.io/metrics/pkg/apis/metrics/v1alpha1
k8s.io/metrics/pkg/apis/metrics/v1beta1
k8s.io/metrics/pkg/client/clientset/versioned/scheme
# k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 => k8s.io/utils v0.0.0-20210802155522-efc7438f0176
# k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9
## explicit; go 1.12
k8s.io/utils/buffer
k8s.io/utils/clock
Expand Down Expand Up @@ -1356,4 +1356,3 @@ sigs.k8s.io/yaml
# k8s.io/mount-utils => k8s.io/mount-utils v0.24.2
# k8s.io/pod-security-admission => k8s.io/pod-security-admission v0.24.2
# k8s.io/sample-apiserver => k8s.io/sample-apiserver v0.24.2
# k8s.io/utils => k8s.io/utils v0.0.0-20210802155522-efc7438f0176

0 comments on commit 01d284c

Please sign in to comment.