Skip to content

Commit 75c7842

Browse files
Merge pull request #739 from atiratree/workload-conditions-bump
OCPBUGS-23435: bump library-go to bring in workload-conditions fix
2 parents deb922d + 32069a6 commit 75c7842

File tree

50 files changed

+747
-223
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+747
-223
lines changed

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ require (
99
github.com/openshift/api v0.0.0-20241001152557-e415140e5d5f
1010
github.com/openshift/build-machinery-go v0.0.0-20241031155326-6ae126a9cb72
1111
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f
12-
github.com/openshift/library-go v0.0.0-20241106000323-9fcf3125a28e
13-
github.com/openshift/multi-operator-manager v0.0.0-20241101153049-fcf403de1051
12+
github.com/openshift/library-go v0.0.0-20241120135057-fc703a7407c9
13+
github.com/openshift/multi-operator-manager v0.0.0-20241119235446-3c965870ef94
1414
github.com/spf13/cobra v1.8.1
1515
github.com/stretchr/testify v1.9.0
1616
go.etcd.io/etcd/client/v3 v3.5.14

go.sum

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,10 +154,10 @@ github.com/openshift/build-machinery-go v0.0.0-20241031155326-6ae126a9cb72 h1:kM
154154
github.com/openshift/build-machinery-go v0.0.0-20241031155326-6ae126a9cb72/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE=
155155
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f h1:FRc0bVNWprihWS0GqQWzb3dY4dkCwpOP3mDw5NwSoR4=
156156
github.com/openshift/client-go v0.0.0-20241001162912-da6d55e4611f/go.mod h1:KiZi2mJRH1TOJ3FtBDYS6YvUL30s/iIXaGSUrSa36mo=
157-
github.com/openshift/library-go v0.0.0-20241106000323-9fcf3125a28e h1:ZPAUe9p5nfbzJzb23s+rdFqDrl3U58hC4Y0merEkoSE=
158-
github.com/openshift/library-go v0.0.0-20241106000323-9fcf3125a28e/go.mod h1:9B1MYPoLtP9tqjWxcbUNVpwxy68zOH/3EIP6c31dAM0=
159-
github.com/openshift/multi-operator-manager v0.0.0-20241101153049-fcf403de1051 h1:2Rsvg5O5xvQfLAxsiOwlAEJepNtLPTLXIFHB46RS3Mo=
160-
github.com/openshift/multi-operator-manager v0.0.0-20241101153049-fcf403de1051/go.mod h1:UBAANHcEhysEeyhtIoLZS5dFYOjjZrv9lUgtHt3cFLk=
157+
github.com/openshift/library-go v0.0.0-20241120135057-fc703a7407c9 h1:bwIqO3LDkumwfDKTMRzixNHKUqU7yaKTTAKwENi6JOY=
158+
github.com/openshift/library-go v0.0.0-20241120135057-fc703a7407c9/go.mod h1:9B1MYPoLtP9tqjWxcbUNVpwxy68zOH/3EIP6c31dAM0=
159+
github.com/openshift/multi-operator-manager v0.0.0-20241119235446-3c965870ef94 h1:9Z5HQo1KSQogIpQ2tDzrCk4+sDjL/xF+YXBrDP4R36k=
160+
github.com/openshift/multi-operator-manager v0.0.0-20241119235446-3c965870ef94/go.mod h1:Fn/rmcwj4bCuS11UT5TZvzONt7qTjzcd9BCSQkIwQOI=
161161
github.com/orisano/pixelmatch v0.0.0-20220722002657-fb0b55479cde/go.mod h1:nZgzbfBr3hhjoZnS66nKrHmduYNpc34ny7RK4z5/HM0=
162162
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
163163
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=

pkg/cmd/operator/cmd.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package operator
33
import (
44
"github.com/spf13/cobra"
55

6+
"k8s.io/utils/clock"
7+
68
"github.com/openshift/cluster-authentication-operator/pkg/operator"
79
"github.com/openshift/cluster-authentication-operator/pkg/version"
810
"github.com/openshift/library-go/pkg/controller/controllercmd"
@@ -11,7 +13,7 @@ import (
1113
const componentName = "cluster-authentication-operator"
1214

1315
func NewOperator() *cobra.Command {
14-
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator.RunOperator).NewCommand()
16+
cmd := controllercmd.NewControllerCommandConfig(componentName, version.Get(), operator.RunOperator, clock.RealClock{}).NewCommand()
1517
cmd.Use = "operator"
1618
cmd.Short = "Start the Authentication Operator"
1719
return cmd

pkg/controllers/configobservation/console/observe_consoleurl_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import (
44
"reflect"
55
"strings"
66
"testing"
7+
"time"
78

89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
910
"k8s.io/client-go/tools/cache"
11+
clocktesting "k8s.io/utils/clock/testing"
1012

1113
configv1 "github.com/openshift/api/config/v1"
1214
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -111,7 +113,7 @@ func TestObserveConsoleURL(t *testing.T) {
111113
ClusterVersionLister: configlistersv1.NewClusterVersionLister(clusterVersionIndexer),
112114
}
113115

114-
eventRecorder := events.NewInMemoryRecorder(tt.name)
116+
eventRecorder := events.NewInMemoryRecorder(tt.name, clocktesting.NewFakePassiveClock(time.Now()))
115117
gotConfig, errs := ObserveConsoleURL(listers, eventRecorder, tt.existingConfig)
116118
if !reflect.DeepEqual(gotConfig, tt.expectedConfig) {
117119
t.Errorf("ObserveConsoleURL() gotConfig = %v, want %v", gotConfig, tt.expectedConfig)

pkg/controllers/configobservation/infrastructure/observe_apiserverurl_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@ import (
44
"reflect"
55
"strings"
66
"testing"
7+
"time"
78

89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
910
"k8s.io/client-go/tools/cache"
11+
clocktesting "k8s.io/utils/clock/testing"
1012

1113
configv1 "github.com/openshift/api/config/v1"
1214
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -73,7 +75,7 @@ func TestObserveAPIServerURL(t *testing.T) {
7375
InfrastructureLister: configlistersv1.NewInfrastructureLister(indexer),
7476
}
7577

76-
eventRecorder := events.NewInMemoryRecorder(tt.name)
78+
eventRecorder := events.NewInMemoryRecorder(tt.name, clocktesting.NewFakePassiveClock(time.Now()))
7779
gotConfig, errs := ObserveAPIServerURL(listers, eventRecorder, tt.existingConfig)
7880
if !reflect.DeepEqual(gotConfig, tt.expectedConfig) {
7981
t.Errorf("ObserveAPIServerURL() gotConfig = %v, want %v", gotConfig, tt.expectedConfig)

pkg/controllers/configobservation/oauth/observe_audit_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ package oauth_test
22

33
import (
44
"testing"
5+
"time"
56

67
"github.com/google/go-cmp/cmp"
78

89
"k8s.io/apimachinery/pkg/api/equality"
910
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1011
"k8s.io/client-go/tools/cache"
12+
clocktesting "k8s.io/utils/clock/testing"
1113

1214
configv1 "github.com/openshift/api/config/v1"
1315
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -120,7 +122,7 @@ func TestAuditProfile(t *testing.T) {
120122
APIServerLister_: configlistersv1.NewAPIServerLister(indexer),
121123
}
122124

123-
have, errs := oauth.ObserveAudit(listers, events.NewInMemoryRecorder(t.Name()), tt.previouslyObservedConfig)
125+
have, errs := oauth.ObserveAudit(listers, events.NewInMemoryRecorder(t.Name(), clocktesting.NewFakePassiveClock(time.Now())), tt.previouslyObservedConfig)
124126
if len(errs) > 0 {
125127
t.Errorf("Expected 0 errors, have %v.", len(errs))
126128
}

pkg/controllers/configobservation/oauth/observe_idps_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package oauth
33
import (
44
"fmt"
55
"testing"
6+
"time"
67

78
"github.com/google/go-cmp/cmp"
89

@@ -11,6 +12,7 @@ import (
1112
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1213
corelistersv1 "k8s.io/client-go/listers/core/v1"
1314
"k8s.io/client-go/tools/cache"
15+
clocktesting "k8s.io/utils/clock/testing"
1416

1517
configv1 "github.com/openshift/api/config/v1"
1618
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -199,7 +201,7 @@ func TestObserveIdentityProviders(t *testing.T) {
199201
OAuthLister_: configlistersv1.NewOAuthLister(indexer),
200202
ResourceSync: &mockResourceSyncer{t: t, synced: syncerData},
201203
}
202-
eventsRecorder := events.NewInMemoryRecorder(t.Name())
204+
eventsRecorder := events.NewInMemoryRecorder(t.Name(), clocktesting.NewFakePassiveClock(time.Now()))
203205

204206
got, errs := ObserveIdentityProviders(listers, eventsRecorder, tt.previouslyObservedConfig)
205207

pkg/controllers/configobservation/oauth/observe_templates_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ package oauth
22

33
import (
44
"testing"
5+
"time"
56

67
"github.com/google/go-cmp/cmp"
78

89
"k8s.io/apimachinery/pkg/api/equality"
910
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1011
corelistersv1 "k8s.io/client-go/listers/core/v1"
1112
"k8s.io/client-go/tools/cache"
13+
clocktesting "k8s.io/utils/clock/testing"
1214

1315
configv1 "github.com/openshift/api/config/v1"
1416
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -88,7 +90,7 @@ func TestObserveTemplates(t *testing.T) {
8890
ConfigMapLister: corelistersv1.NewConfigMapLister(indexer),
8991
ResourceSync: &mockResourceSyncer{t: t, synced: syncerData},
9092
}
91-
got, errs := ObserveTemplates(listers, events.NewInMemoryRecorder(t.Name()), tt.previouslyObservedConfig)
93+
got, errs := ObserveTemplates(listers, events.NewInMemoryRecorder(t.Name(), clocktesting.NewFakePassiveClock(time.Now())), tt.previouslyObservedConfig)
9294
if len(errs) > 0 {
9395
t.Errorf("Expected 0 errors, got %v.", len(errs))
9496
}

pkg/controllers/configobservation/oauth/observe_tokenconfig_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@ package oauth
22

33
import (
44
"testing"
5+
"time"
56

67
"github.com/google/go-cmp/cmp"
78

89
"k8s.io/apimachinery/pkg/api/equality"
910
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1011
"k8s.io/client-go/tools/cache"
12+
clocktesting "k8s.io/utils/clock/testing"
1113

1214
configv1 "github.com/openshift/api/config/v1"
1315
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -119,7 +121,7 @@ func TestObserveTokenConfig(t *testing.T) {
119121
listers := configobservation.Listers{
120122
OAuthLister_: configlistersv1.NewOAuthLister(indexer),
121123
}
122-
got, errs := ObserveTokenConfig(listers, events.NewInMemoryRecorder(t.Name()), tt.previouslyObservedConfig)
124+
got, errs := ObserveTokenConfig(listers, events.NewInMemoryRecorder(t.Name(), clocktesting.NewFakePassiveClock(time.Now())), tt.previouslyObservedConfig)
123125
if len(errs) > 0 {
124126
t.Errorf("Expected 0 errors, got %v.", len(errs))
125127
}

pkg/controllers/configobservation/routersecret/observe_router_secret_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@ package routersecret
33
import (
44
"reflect"
55
"testing"
6+
"time"
67

78
corev1 "k8s.io/api/core/v1"
89
"k8s.io/apimachinery/pkg/api/errors"
910
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
1011
"k8s.io/apimachinery/pkg/runtime/schema"
1112
corev1listers "k8s.io/client-go/listers/core/v1"
1213
"k8s.io/client-go/tools/cache"
14+
clocktesting "k8s.io/utils/clock/testing"
1315

1416
configv1 "github.com/openshift/api/config/v1"
1517
configlistersv1 "github.com/openshift/client-go/config/listers/config/v1"
@@ -180,7 +182,7 @@ func TestObserveRouterSecret(t *testing.T) {
180182
IngressLister: configlistersv1.NewIngressLister(indexer),
181183
}
182184

183-
eventRecorder := events.NewInMemoryRecorder(tt.name)
185+
eventRecorder := events.NewInMemoryRecorder(tt.name, clocktesting.NewFakePassiveClock(time.Now()))
184186
gotConfig, errs := ObserveRouterSecret(listers, eventRecorder, tt.existingConfig)
185187
if !reflect.DeepEqual(gotConfig, tt.expectedConfig) {
186188
t.Errorf("ObserveRouterSecret() gotConfig = %v, want %v", gotConfig, tt.expectedConfig)

0 commit comments

Comments
 (0)