diff --git a/.github/workflows/jobs.yaml b/.github/workflows/jobs.yaml index f98cb513a1..ca537b80ea 100644 --- a/.github/workflows/jobs.yaml +++ b/.github/workflows/jobs.yaml @@ -1605,7 +1605,7 @@ jobs: go tool cover -func=all.out | grep total > tmp2 result=`cat tmp2 | awk 'END {print $3}'` result=${result%\%} - threshold=52.60 + threshold=53.40 echo "Result:" echo "$result%" if (( $(echo "$result >= $threshold" |bc -l) )); then diff --git a/operator-integration/tenant_test.go b/operator-integration/tenant_test.go index 4ae7af01b1..49c421377a 100644 --- a/operator-integration/tenant_test.go +++ b/operator-integration/tenant_test.go @@ -1083,3 +1083,46 @@ func TestSetTenantLogs(t *testing.T) { ) } } + +func TenantDetails(nameSpace, tenant string) (*http.Response, error) { + /* + url: /namespaces/{namespace}/tenants/{tenant} + summary: Tenant Details + operationId: TenantDetails + HTTP Verb: GET + */ + request, err := http.NewRequest( + "GET", + "http://localhost:9090/api/v1/namespaces/"+nameSpace+"/tenants/"+tenant, + nil, + ) + if err != nil { + log.Println(err) + } + request.Header.Add("Cookie", fmt.Sprintf("token=%s", token)) + request.Header.Add("Content-Type", "application/json") + client := &http.Client{ + Timeout: 2 * time.Second, + } + response, err := client.Do(request) + return response, err +} + +func TestTenantDetails(t *testing.T) { + // Vars + assert := assert.New(t) + nameSpace := "tenant-lite" + tenant := "storage-lite" + resp, err := TenantDetails(nameSpace, tenant) + if err != nil { + log.Println(err) + return + } + if resp != nil { + assert.Equal( + 200, + resp.StatusCode, + inspectHTTPResponse(resp), + ) + } +}