Skip to content

Commit

Permalink
Getting rid of deprecated function
Browse files Browse the repository at this point in the history
  • Loading branch information
ljakimczuk committed Jan 10, 2025
1 parent 237306e commit a1009fe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions service/controller/app/resource/chart/desired_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -856,7 +856,7 @@ func Test_Resource_GetDesiredState(t *testing.T) {
GetIndexResponse: tc.index,
}),
Logger: microloggertest.New(),
CtrlClient: fake.NewFakeClientWithScheme(s), //nolint:staticcheck
CtrlClient: fake.NewClientBuilder().WithScheme(s)..Build(), //nolint:staticcheck

Check failure on line 859 in service/controller/app/resource/chart/desired_test.go

View workflow job for this annotation

GitHub Actions / pre-commit

expected selector or type assertion, found '.'
DynamicClient: dynamicfake.NewSimpleDynamicClient(s),

ChartNamespace: "giantswarm",
Expand All @@ -877,7 +877,7 @@ func Test_Resource_GetDesiredState(t *testing.T) {
s := runtime.NewScheme()
s.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.Chart{}, &v1alpha1.ChartList{})
config := k8sclienttest.ClientsConfig{
CtrlClient: fake.NewFakeClientWithScheme(s), //nolint:staticcheck
CtrlClient: fake.NewClientBuilder().WithScheme(s)..Build(), //nolint:staticcheck
K8sClient: clientgofake.NewSimpleClientset(objs...),
}
client := k8sclienttest.NewClients(config)
Expand Down Expand Up @@ -1357,7 +1357,7 @@ func Test_Resource_Bulid_TarballURL(t *testing.T) {
c := Config{
IndexCache: indexcachetest.NewMap(tc.indices),
Logger: microloggertest.New(),
CtrlClient: fake.NewFakeClientWithScheme(s), //nolint:staticcheck
CtrlClient: fake.NewClientBuilder().WithScheme(s).Build(), //nolint:staticcheck
DynamicClient: dynamicfake.NewSimpleDynamicClient(s),

ChartNamespace: "giantswarm",
Expand All @@ -1373,7 +1373,7 @@ func Test_Resource_Bulid_TarballURL(t *testing.T) {
s := runtime.NewScheme()
s.AddKnownTypes(v1alpha1.SchemeGroupVersion, &v1alpha1.Chart{}, &v1alpha1.ChartList{})
config := k8sclienttest.ClientsConfig{
CtrlClient: fake.NewFakeClientWithScheme(s, objs...), //nolint:staticcheck
CtrlClient: fake.NewClientBuilder().WithScheme(s).WithRuntimeObjects(objs...).Build(), //nolint:staticcheck
K8sClient: clientgofake.NewSimpleClientset(),
}
client := k8sclienttest.NewClients(config)
Expand Down

0 comments on commit a1009fe

Please sign in to comment.