Skip to content

Commit

Permalink
Add Cryostat Operator User-Agent (#52)
Browse files Browse the repository at this point in the history
  • Loading branch information
ebaron authored Nov 13, 2023
1 parent 56c7a57 commit 663067c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@ const (
marketplaceOperatorPrefix = `marketplace-operator/`
acmOperator = `acm-operator/`
assistedInstallerOperatorPrefix = `assisted-installer-operator/`
cryostatOperatorPrefix = `cryostat-operator/`
)

var (
operatorPrefixes = [5]string{insightsOperatorPrefix, costMgmtOperatorPrefix, marketplaceOperatorPrefix, acmOperator, assistedInstallerOperatorPrefix}
operatorPrefixes = [6]string{insightsOperatorPrefix, costMgmtOperatorPrefix, marketplaceOperatorPrefix, acmOperator, assistedInstallerOperatorPrefix, cryostatOperatorPrefix}
)

// returns the cluster id from the user agent string used by the support operator
Expand Down
2 changes: 1 addition & 1 deletion server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ var _ = Describe("Handler", func() {
})

Describe("When called with a valid request", func() {
validOperatorAgents := []string{"insights-operator", "cost-mgmt-operator", "marketplace-operator", "acm-operator", "assisted-installer-operator"}
validOperatorAgents := []string{"insights-operator", "cost-mgmt-operator", "marketplace-operator", "acm-operator", "assisted-installer-operator", "cryostat-operator"}
for _, a := range validOperatorAgents {
It(fmt.Sprintf("should return a valid Identity json for %s", a), func() {
_, ident := call(wrapper, fmt.Sprintf("%s/abc cluster/123", a), "Bearer mytoken")
Expand Down

0 comments on commit 663067c

Please sign in to comment.