Skip to content

Commit

Permalink
Add tenants tests phase 1 (#2566)
Browse files Browse the repository at this point in the history
  • Loading branch information
reivaj05 authored Jan 11, 2023
1 parent dc8d4b4 commit d1aee5d
Show file tree
Hide file tree
Showing 3 changed files with 613 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1527,7 +1527,7 @@ jobs:
go tool cover -func=all.out | grep total > tmp2
result=`cat tmp2 | awk 'END {print $3}'`
result=${result%\%}
threshold=58.7
threshold=62.0
echo "Result:"
echo "$result%"
if (( $(echo "$result >= $threshold" |bc -l) )); then
Expand Down
5 changes: 2 additions & 3 deletions operatorapi/tenants.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ func registerTenantHandlers(api *operations.OperatorAPI) {
api.OperatorAPIUpdateTenantDomainsHandler = operator_api.UpdateTenantDomainsHandlerFunc(func(params operator_api.UpdateTenantDomainsParams, principal *models.Principal) middleware.Responder {
err := getUpdateDomainsResponse(principal, params)
if err != nil {
operator_api.NewUpdateTenantDomainsDefault(int(err.Code)).WithPayload(err)
return operator_api.NewUpdateTenantDomainsDefault(int(err.Code)).WithPayload(err)
}
return operator_api.NewUpdateTenantDomainsNoContent()
})
Expand Down Expand Up @@ -434,7 +434,7 @@ func deleteTenantAction(
return nil
}

// getDeleteTenantResponse gets the output of deleting a minio instance
// getDeletePodResponse gets the output of deleting a minio instance
func getDeletePodResponse(session *models.Principal, params operator_api.DeletePodParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()
Expand Down Expand Up @@ -2733,7 +2733,6 @@ func getTenantEventsResponse(session *models.Principal, params operator_api.GetT
func getUpdateDomainsResponse(session *models.Principal, params operator_api.UpdateTenantDomainsParams) *models.Error {
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
defer cancel()

operatorCli, err := cluster.OperatorClient(session.STSSessionToken)
if err != nil {
return restapi.ErrorWithContext(ctx, err)
Expand Down
Loading

0 comments on commit d1aee5d

Please sign in to comment.