Skip to content

Commit

Permalink
[YUNIKORN-1735] REST API for specific node
Browse files Browse the repository at this point in the history
  • Loading branch information
steinsgateted committed May 18, 2023
1 parent a7718da commit b663b93
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webservice/handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ func TestGetPartitionNodes(t *testing.T) {
getPartitionNodes(resp, req)
assertParamsMissing(t, resp)

// test specific node
// Test specific node
req, err = http.NewRequest("GET", "/ws/v1/partition/default/nodes/node-1", strings.NewReader(""))
req = req.WithContext(context.WithValue(req.Context(), httprouter.ParamsKey, httprouter.Params{httprouter.Param{Key: "node", Value: "node-1"}}))
assert.NilError(t, err, "Get Node for PartitionNode Handler request failed")
Expand All @@ -869,7 +869,7 @@ func TestGetPartitionNodes(t *testing.T) {

// Test node id is missing
req, err = http.NewRequest("GET", "/ws/v1/partition/default/node/node-1", strings.NewReader(""))
req = req.WithContext(context.WithValue(req.Context(), httprouter.ParamsKey, httprouter.Params{httprouter.Param{Key: "partition", Value: "default"},httprouter.Param{Key: "node", Value: ""}}))
req = req.WithContext(context.WithValue(req.Context(), httprouter.ParamsKey, httprouter.Params{httprouter.Param{Key: "partition", Value: "default"}, httprouter.Param{Key: "node", Value: ""}}))
assert.NilError(t, err, "Get Node for PartitionNode Handler request failed")
resp = &MockResponseWriter{}
getPartitionNode(resp, req)
Expand Down

0 comments on commit b663b93

Please sign in to comment.