Skip to content

Commit ec330d3

Browse files
committed
Fix gofmt and JSON format issues
- Fix gofmt formatting in monitortest.go - Exclude test data JSON file from JSON validation as it contains concatenated JSON objects intentionally for test purposes
1 parent 9fb7603 commit ec330d3

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

hack/verify-jsonformat.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ found=0
2020
excluded_files=(
2121
"test/extended/testdata/cmd/test/cmd/testdata/new-app/bc-from-imagestreamimage.json"
2222
"test/extended/testdata/cmd/test/cmd/testdata/new-app/invalid.json"
23+
"test/extended/util/compat_otp/testdata/opm/render/validate/catalog-error/operator-2/index.json"
2324
)
2425

2526
set +e

pkg/monitortests/kubeapiserver/disruptioninclusterapiserver/monitortest.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ type InvariantInClusterDisruption struct {
7878
isAROHCPCluster bool
7979
isBareMetalHypershift bool
8080
adminRESTConfig *rest.Config
81-
kubeClient kubernetes.Interface
81+
kubeClient kubernetes.Interface
8282
}
8383

8484
func NewInvariantInClusterDisruption(info monitortestframework.MonitorTestInitializationInfo) monitortestframework.MonitorTest {

test/extended/util/compat_otp/testdata/opm/render/validate/catalog-error/operator-2/index.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,4 @@
193193
}
194194
}
195195
]
196-
}
196+
}

test/extended/util/managed_services.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,14 +114,13 @@ func IsBareMetalHyperShiftCluster(ctx context.Context, managementOC *CLI) (bool,
114114
if err != nil {
115115
return false, fmt.Errorf("failed to get hosted cluster names: %v", err)
116116
}
117-
117+
118118
if len(clusterNames) == 0 {
119119
return false, fmt.Errorf("no hosted clusters found")
120120
}
121121

122-
// Get the first hosted cluster name
123122
clusterName := strings.Split(strings.TrimSpace(clusterNames), " ")[0]
124-
123+
125124
// Get the platform type of the hosted cluster
126125
platformType, err := managementOC.AsAdmin().WithoutNamespace().Run("get").Args(
127126
"hostedcluster", clusterName, "-n", hcpNamespace, `-ojsonpath={.spec.platform.type}`).Output()

0 commit comments

Comments
 (0)