Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[YUNIKORN-2859] fix: missing assertion in TestGetApplicationHandler #965

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
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
12 changes: 12 additions & 0 deletions pkg/webservice/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1741,6 +1741,9 @@ func TestGetApplicationHandler(t *testing.T) {
getApplication(resp, req)
err = json.Unmarshal(resp.outputBytes, &appsDao)
assert.NilError(t, err, unmarshalError)
assert.Equal(t, appsDao.ApplicationID, "app-1")
assert.Equal(t, appsDao.Partition, "default")
assert.Equal(t, appsDao.QueueName, "root.default")

if !appsDao.HasReserved {
assert.Equal(t, len(appsDao.Reservations), 0)
Expand Down Expand Up @@ -1781,6 +1784,15 @@ func TestGetApplicationHandler(t *testing.T) {
getApplication(resp4, req4)
err = json.Unmarshal(resp4.outputBytes, &appsDao4)
assert.NilError(t, err, unmarshalError)
assert.Assert(t, appsDao4 != nil)
assert.Equal(t, appsDao4.ApplicationID, "app-1")
assert.Equal(t, appsDao4.Partition, "default")
assert.Equal(t, appsDao4.QueueName, "root.default")
if !appsDao4.HasReserved {
assert.Equal(t, len(appsDao4.Reservations), 0)
} else {
assert.Check(t, len(appsDao4.Reservations) > 0, "app should have at least 1 reservation")
}
ryankert01 marked this conversation as resolved.
Show resolved Hide resolved

// test invalid queue name
var req5 *http.Request
Expand Down
Loading