Skip to content

Commit 8fc38a6

Browse files
Merge pull request #511 from ratnam915/feature/OSD-30036
SREP-1011: Fixing dependency on OCM TOKEN for CAD E2E Tests
2 parents 432ba32 + e6971b9 commit 8fc38a6

File tree

4 files changed

+28
-27
lines changed

4 files changed

+28
-27
lines changed

go.mod

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ require (
1313
github.com/aws/aws-sdk-go-v2/service/ec2 v1.137.1
1414
github.com/aws/aws-sdk-go-v2/service/sts v1.33.19
1515
github.com/onsi/gomega v1.37.0
16-
github.com/openshift-online/ocm-sdk-go v0.1.465
16+
github.com/openshift-online/ocm-sdk-go v0.1.469
1717
github.com/openshift/api v0.0.0-20240522145529-93d6bda14341
1818
github.com/openshift/aws-account-operator/api v0.0.0-20231122143531-33ce90caf221
1919
github.com/openshift/backplane-cli v0.1.47-0.20250521025004-fb46bb233d3d
2020
github.com/openshift/hive/apis v0.0.0-20231116161336-9dd47f8bfa1f
2121
github.com/openshift/osd-network-verifier v1.2.3
22-
github.com/openshift/osde2e-common v0.0.0-20250409072139-f917c50a4bd2
22+
github.com/openshift/osde2e-common v0.0.0-20250703192222-36c5869579b1
2323
github.com/prometheus/client_golang v1.22.0
24-
github.com/prometheus/common v0.63.0
24+
github.com/prometheus/common v0.65.0
2525
github.com/spf13/cobra v1.9.1
2626
github.com/tektoncd/triggers v0.27.0
2727
go.uber.org/mock v0.5.0
@@ -72,7 +72,7 @@ require (
7272
github.com/MakeNowJust/heredoc v1.0.0 // indirect
7373
github.com/Masterminds/goutils v1.1.1 // indirect
7474
github.com/Masterminds/semver v1.5.0 // indirect
75-
github.com/Masterminds/semver/v3 v3.3.1 // indirect
75+
github.com/Masterminds/semver/v3 v3.4.0 // indirect
7676
github.com/Masterminds/sprig/v3 v3.3.0 // indirect
7777
github.com/Masterminds/squirrel v1.5.4 // indirect
7878
github.com/Microsoft/hcsshim v0.13.0 // indirect
@@ -233,6 +233,8 @@ require (
233233
github.com/ollama/ollama v0.5.1 // indirect
234234
github.com/opencontainers/go-digest v1.0.0 // indirect
235235
github.com/opencontainers/image-spec v1.1.1 // indirect
236+
github.com/openshift-online/ocm-api-model/clientapi v0.0.0-20250619114224-37dc3401307a // indirect
237+
github.com/openshift-online/ocm-api-model/model v0.0.0-20250619114224-37dc3401307a // indirect
236238
github.com/openshift-online/ocm-cli v1.0.5 // indirect
237239
github.com/openshift/backplane-api v0.0.0-20250514095514-2aa57551ec70 // indirect
238240
github.com/openshift/custom-resource-status v1.1.3-0.20220503160415-f2fdb4999d87 // indirect
@@ -243,7 +245,7 @@ require (
243245
github.com/pkg/browser v0.0.0-20240102092130-5ac0b6a4141c // indirect
244246
github.com/pkg/errors v0.9.1 // indirect
245247
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
246-
github.com/prometheus/client_model v0.6.1 // indirect
248+
github.com/prometheus/client_model v0.6.2 // indirect
247249
github.com/prometheus/procfs v0.15.1 // indirect
248250
github.com/prometheus/prometheus v0.302.1 // indirect
249251
github.com/prometheus/sigv4 v0.1.1 // indirect

go.sum

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -693,8 +693,8 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ
693693
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
694694
github.com/Masterminds/semver v1.5.0 h1:H65muMkzWKEuNDnfl9d70GUjFniHKHRbFPGBuZ3QEww=
695695
github.com/Masterminds/semver v1.5.0/go.mod h1:MB6lktGJrhw8PrUyiEoblNEGEQ+RzHPF078ddwwvV3Y=
696-
github.com/Masterminds/semver/v3 v3.3.1 h1:QtNSWtVZ3nBfk8mAOu/B6v7FMJ+NHTIgUPi7rj+4nv4=
697-
github.com/Masterminds/semver/v3 v3.3.1/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
696+
github.com/Masterminds/semver/v3 v3.4.0 h1:Zog+i5UMtVoCU8oKka5P7i9q9HgrJeGzI9SA1Xbatp0=
697+
github.com/Masterminds/semver/v3 v3.4.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
698698
github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
699699
github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
700700
github.com/Masterminds/squirrel v1.5.4 h1:uUcX/aBc8O7Fg9kaISIUsHXdKuqehiXAMQTYX8afzqM=
@@ -1244,8 +1244,8 @@ github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJ
12441244
github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
12451245
github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo=
12461246
github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM=
1247-
github.com/hashicorp/go-retryablehttp v0.7.7 h1:C8hUCYzor8PIfXHa4UrZkU4VvK8o9ISHxT2Q8+VepXU=
1248-
github.com/hashicorp/go-retryablehttp v0.7.7/go.mod h1:pkQpWZeYWskR+D1tR2O5OcBFOxfA7DoAO6xtkuQnHTk=
1247+
github.com/hashicorp/go-retryablehttp v0.7.8 h1:ylXZWnqa7Lhqpk0L1P1LzDtGcCR0rPVUrx/c8Unxc48=
1248+
github.com/hashicorp/go-retryablehttp v0.7.8/go.mod h1:rjiScheydd+CxvumBsIrFKlx3iS0jrZ7LvzFGFmuKbw=
12491249
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
12501250
github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
12511251
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
@@ -1478,10 +1478,14 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8
14781478
github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
14791479
github.com/opencontainers/image-spec v1.1.1 h1:y0fUlFfIZhPF1W537XOLg0/fcx6zcHCJwooC2xJA040=
14801480
github.com/opencontainers/image-spec v1.1.1/go.mod h1:qpqAh3Dmcf36wStyyWU+kCeDgrGnAve2nCC8+7h8Q0M=
1481+
github.com/openshift-online/ocm-api-model/clientapi v0.0.0-20250619114224-37dc3401307a h1:6yb+WG4oqakYlBxMZptAF2ijLq+IQ1sG9e7yWbHyFgU=
1482+
github.com/openshift-online/ocm-api-model/clientapi v0.0.0-20250619114224-37dc3401307a/go.mod h1:fZwy5HY2URG9nrExvQeXrDU/08TGqZ16f8oymVEN5lo=
1483+
github.com/openshift-online/ocm-api-model/model v0.0.0-20250619114224-37dc3401307a h1:rGtR5YLBV/MxoDMoJdIqdgYbb8ljNC6ycMf1dog5LuM=
1484+
github.com/openshift-online/ocm-api-model/model v0.0.0-20250619114224-37dc3401307a/go.mod h1:B/fZxd88BTKig/rCCc189cENnFlEzxQslHHzoSgvo1I=
14811485
github.com/openshift-online/ocm-cli v1.0.5 h1:YgtU7vkprnDlI8LovjjeA48x1FXxlKZt/91Tb+rgWHU=
14821486
github.com/openshift-online/ocm-cli v1.0.5/go.mod h1:u3mIMD71A2hRJEgd9ZT9MfmPjMAvvXxje+StqHpfaEc=
1483-
github.com/openshift-online/ocm-sdk-go v0.1.465 h1:RZr92sdcAKyLVcL19/RYOn6KVtspDUH1wc3UuO4LgiE=
1484-
github.com/openshift-online/ocm-sdk-go v0.1.465/go.mod h1:EOkylgH0bafd+SlU9YvMrIIxHJw0Hk1EnC7W1VZeW8I=
1487+
github.com/openshift-online/ocm-sdk-go v0.1.469 h1:PdtKbT007q9OjFHMznutIxPXaembpM/LL8tP7oMtc50=
1488+
github.com/openshift-online/ocm-sdk-go v0.1.469/go.mod h1:RjLocq1aHUZ4h7LxkAqZVCIrPgWOiaJN1qOtDHY6MA4=
14851489
github.com/openshift/api v0.0.0-20240522145529-93d6bda14341 h1:JQpzgk+p24rkgNbNsrNR0yLm63WTKapuT60INU5BqT8=
14861490
github.com/openshift/api v0.0.0-20240522145529-93d6bda14341/go.mod h1:qNtV0315F+f8ld52TLtPvrfivZpdimOzTi3kn9IVbtU=
14871491
github.com/openshift/aws-account-operator/api v0.0.0-20231122143531-33ce90caf221 h1:fEk/n2jyq8hLYPDIw0Hjq11006glrKyFaku4M9XAVHQ=
@@ -1496,8 +1500,8 @@ github.com/openshift/hive/apis v0.0.0-20231116161336-9dd47f8bfa1f h1:CedFPNwCSYb
14961500
github.com/openshift/hive/apis v0.0.0-20231116161336-9dd47f8bfa1f/go.mod h1:RRH8lt09SAiPECNdsbh7Gun0lkcRWi1nYKq6tDp5WxQ=
14971501
github.com/openshift/osd-network-verifier v1.2.3 h1:MW+u2LR8M5AWzQ2t/RsS7JWycBAleUgT480AMO4VMu4=
14981502
github.com/openshift/osd-network-verifier v1.2.3/go.mod h1:X3dVNkC91NYTf2kTXUS/PeRTNvfS97WbvIqPIDP083M=
1499-
github.com/openshift/osde2e-common v0.0.0-20250409072139-f917c50a4bd2 h1:6LsEqY4y+tufDHtYEsqpTcF3Ti1G0Awb09X4HtwLrHE=
1500-
github.com/openshift/osde2e-common v0.0.0-20250409072139-f917c50a4bd2/go.mod h1:0Km7yKh+s2X5cEz9a79LQXmOBDx35gt7MArb9kWXSZE=
1503+
github.com/openshift/osde2e-common v0.0.0-20250703192222-36c5869579b1 h1:hXEqS/qApJ61AAbrsgjwJxMpBATUS046HxH34EIzDQk=
1504+
github.com/openshift/osde2e-common v0.0.0-20250703192222-36c5869579b1/go.mod h1:RSH57cGEQRIkKzoXdzqpsA3oHp4zIzGHD97TmsqUTOo=
15011505
github.com/openzipkin/zipkin-go v0.4.3 h1:9EGwpqkgnwdEIJ+Od7QVSEIH+ocmm5nPat0G7sjsSdg=
15021506
github.com/openzipkin/zipkin-go v0.4.3/go.mod h1:M9wCJZFWCo2RiY+o1eBCEMe0Dp2S5LDHcMZmk3RmK7c=
15031507
github.com/oracle/oci-go-sdk/v65 v65.79.0 h1:Tv9L1XTKWkdXtSViMbP+dA93WunquvW++/2s5pOvOgU=
@@ -1548,17 +1552,17 @@ github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:
15481552
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
15491553
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
15501554
github.com/prometheus/client_model v0.2.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
1551-
github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
1552-
github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
1555+
github.com/prometheus/client_model v0.6.2 h1:oBsgwpGs7iVziMvrGhE53c/GrLUsZdHnqNwqPLxwZyk=
1556+
github.com/prometheus/client_model v0.6.2/go.mod h1:y3m2F6Gdpfy6Ut/GBsUqTWZqCUvMVzSfMLjcu6wAwpE=
15531557
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
15541558
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
15551559
github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo=
15561560
github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc=
15571561
github.com/prometheus/common v0.32.1/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls=
15581562
github.com/prometheus/common v0.35.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
15591563
github.com/prometheus/common v0.37.0/go.mod h1:phzohg0JFMnBEFGxTDbfu3QyL5GI8gTQJFhYO5B3mfA=
1560-
github.com/prometheus/common v0.63.0 h1:YR/EIY1o3mEFP/kZCD7iDMnLPlGyuU2Gb3HIcXnA98k=
1561-
github.com/prometheus/common v0.63.0/go.mod h1:VVFF/fBIoToEnWRVkYoXEkq3R3paCoxG9PXP74SnV18=
1564+
github.com/prometheus/common v0.65.0 h1:QDwzd+G1twt//Kwj/Ww6E9FQq1iVMmODnILtW1t2VzE=
1565+
github.com/prometheus/common v0.65.0/go.mod h1:0gZns+BLRQ3V6NdaerOhMbwwRbNh9hkGINtQAsP5GS8=
15621566
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
15631567
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
15641568
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=

test/e2e/configuration_anomaly_detection_tests.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,13 @@ var _ = Describe("Configuration Anomaly Detection", Ordered, func() {
4747
logger.SetLogger(ginkgo.GinkgoLogr)
4848
var err error
4949
ocmEnv := ocme2e.Stage
50-
ocmToken := os.Getenv("OCM_TOKEN")
5150
clientID := os.Getenv("CLIENT_ID")
5251
clientSecret := os.Getenv("CLIENT_SECRET")
5352
clusterID = os.Getenv("OCM_CLUSTER_ID")
5453

55-
Expect(ocmToken).NotTo(BeEmpty(), "OCM_TOKEN must be set")
5654
Expect(clusterID).NotTo(BeEmpty(), "CLUSTER_ID must be set")
5755

58-
ocme2eCli, err = ocme2e.New(ctx, ocmToken, clientID, clientSecret, ocmEnv)
56+
ocme2eCli, err = ocme2e.New(ctx, "", clientID, clientSecret, ocmEnv)
5957
Expect(err).ShouldNot(HaveOccurred(), "Unable to setup E2E OCM Client")
6058

6159
k8s, err = openshift.New(ginkgo.GinkgoLogr)

test/e2e/utils/utils.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//go:build osde2e
2-
// +build osde2e
3-
41
package utils
52

63
import (
@@ -32,14 +29,14 @@ func GetServiceLogs(ocmLike interface{}, cluster *cmv1.Cluster) (*servicelogsv1.
3229
case ocm.Client:
3330
clusterLogsUUIDListResponse, err := v.GetServiceLog(cluster, filter)
3431
if err != nil {
35-
return nil, fmt.Errorf("Failed to get service log: %w", err)
32+
return nil, fmt.Errorf("failed to get service log: %w", err)
3633
}
3734
return clusterLogsUUIDListResponse, nil
3835
case *ocme2e.Client:
3936
adapter := &e2eOCMAdapter{conn: v.Connection}
4037
clusterLogsUUIDListResponse, err := adapter.GetServiceLog(cluster, filter)
4138
if err != nil {
42-
return nil, fmt.Errorf("Failed to get service log (via adapter): %w", err)
39+
return nil, fmt.Errorf("failed to get service log (via adapter): %w", err)
4340
}
4441
return clusterLogsUUIDListResponse, nil
4542
default:
@@ -106,11 +103,11 @@ func getCreatorFromCluster(conn *sdk.Connection, cluster *cmv1.Cluster) (*amv1.A
106103
func CreateClientFromKubeConfig(kubeConfigPath string) (pclient.Client, error) {
107104
cfg, err := clientcmd.BuildConfigFromFlags("", kubeConfigPath)
108105
if err != nil {
109-
return nil, fmt.Errorf("failed to build kubeconfig: %v", err)
106+
return nil, fmt.Errorf("failed to build kubeconfig: %w", err)
110107
}
111108
cl, err := pclient.New(cfg, pclient.Options{})
112109
if err != nil {
113-
return nil, fmt.Errorf("failed to create Kubernetes client: %v", err)
110+
return nil, fmt.Errorf("failed to create Kubernetes client: %w", err)
114111
}
115112
return cl, nil
116113
}

0 commit comments

Comments
 (0)