ryankert01 commented on code in PR #965:
URL: https://github.com/apache/yunikorn-core/pull/965#discussion_r1751224806


##########
pkg/webservice/handlers_test.go:
##########
@@ -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")
+       }

Review Comment:
   Indeed, and looks like there's no reservation there, so I assert it to be 
the default value.
   ```
   assert.Equal(t, len(appsDao4.Reservations), 0)
   ```



##########
pkg/webservice/handlers_test.go:
##########
@@ -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")
+       }

Review Comment:
   Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to