Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
)
}
}