Skip to content

Commit 1fd670b

Browse files
authored
feature: "disabled integrations" builder for the tests (#524)
Adds the required test builder for the "disabled integrations" feature, to make testing easier. SANDBOX-1769
1 parent d25d828 commit 1fd670b

3 files changed

Lines changed: 11 additions & 3 deletions

File tree

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ require (
2626
)
2727

2828
require (
29-
github.com/codeready-toolchain/api v0.0.0-20260305144020-4ff0e6b6e174
29+
github.com/codeready-toolchain/api v0.0.0-20260415142422-12ff40f3bdb6
3030
github.com/ghodss/yaml v1.0.0
3131
github.com/google/go-cmp v0.7.0
3232
github.com/google/go-github/v52 v52.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XL
2020
github.com/cloudflare/circl v1.1.0/go.mod h1:prBCrKB9DV4poKZY1l9zBXg2QJY7mvgRvtMxxK7fi4I=
2121
github.com/cloudflare/circl v1.6.3 h1:9GPOhQGF9MCYUeXyMYlqTR6a5gTrgR/fBLXvUgtVcg8=
2222
github.com/cloudflare/circl v1.6.3/go.mod h1:2eXP6Qfat4O/Yhh8BznvKnJ+uzEoTQ6jVKJRn81BiS4=
23-
github.com/codeready-toolchain/api v0.0.0-20260305144020-4ff0e6b6e174 h1:hed3ZyardxswS6yMB0ME9l3vEkO+pFouyk4dvIiAQOo=
24-
github.com/codeready-toolchain/api v0.0.0-20260305144020-4ff0e6b6e174/go.mod h1:PMg6kNHuCGNlu3MOdrCisqGkBpvzB0qS1+E6nrXxPAc=
23+
github.com/codeready-toolchain/api v0.0.0-20260415142422-12ff40f3bdb6 h1:d4DTT/6zhDFTN9rlCggsz/PLZGUCRccbSATcDmdTjzI=
24+
github.com/codeready-toolchain/api v0.0.0-20260415142422-12ff40f3bdb6/go.mod h1:PMg6kNHuCGNlu3MOdrCisqGkBpvzB0qS1+E6nrXxPAc=
2525
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
2626
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
2727
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

pkg/test/config/toolchainconfig.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package config
33
import (
44
"context"
55
"os"
6+
"slices"
67
"testing"
78

89
toolchainv1alpha1 "github.com/codeready-toolchain/api/api/v1alpha1"
@@ -276,6 +277,13 @@ func (o RegistrationServiceOption) RegistrationServiceURL(value string) Registra
276277
return o
277278
}
278279

280+
func (o RegistrationServiceOption) DisabledIntegrations(values []string) RegistrationServiceOption {
281+
o.addFunction(func(config *toolchainv1alpha1.ToolchainConfig) {
282+
config.Spec.Host.RegistrationService.DisabledIntegrations = slices.Clone(values)
283+
})
284+
return o
285+
}
286+
279287
func (o RegistrationServiceOption) Analytics() RegistrationServiceAnalyticsOption {
280288
c := RegistrationServiceAnalyticsOption{
281289
ToolchainConfigOptionImpl: o.ToolchainConfigOptionImpl,

0 commit comments

Comments
 (0)