Skip to content

Commit

Permalink
Merge branch 'master' into object-url-select
Browse files Browse the repository at this point in the history
  • Loading branch information
dvaldivia committed Apr 13, 2022
2 parents 1b3c0c2 + 5e10719 commit 6ca327b
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ jobs:
result=${result%\%}
echo "result:"
echo $result
threshold=35.40
threshold=35.60
if (( $(echo "$result >= $threshold" |bc -l) )); then
echo "It is equal or greater than threshold, passed!"
else
Expand Down
38 changes: 38 additions & 0 deletions integration/admin_api_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,3 +300,41 @@ func TestGetNodes(t *testing.T) {
}

}

func ArnList() (*http.Response, error) {
/*
Helper function to get arn list
HTTP Verb: GET
URL: /api/v1/admin/arns
*/
request, err := http.NewRequest(
"GET", "http://localhost:9090/api/v1/admin/arns", 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 TestArnList(t *testing.T) {
assert := assert.New(t)
resp, err := ArnList()
assert.Nil(err)
if err != nil {
log.Println(err)
return
}
objRsp := inspectHTTPResponse(resp)
if resp != nil {
assert.Equal(
200,
resp.StatusCode,
objRsp,
)
}
}

0 comments on commit 6ca327b

Please sign in to comment.