mirror of
https://github.com/kemko/nomad.git
synced 2026-01-07 02:45:42 +03:00
fix failing test assertion
small refactors
This commit is contained in:
@@ -15,7 +15,7 @@ func (c *Client) JobResources() *JobResources {
|
||||
|
||||
// List returns a list of all resources for a particular context. If a
|
||||
// context is not specified, matches for all contezts are returned.
|
||||
func (j *JobResources) List(prefix string, context string) (*structs.ResourceListResponse, error) {
|
||||
func (j *JobResources) List(prefix, context string) (*structs.ResourceListResponse, error) {
|
||||
var resp structs.ResourceListResponse
|
||||
req := &structs.ResourceListRequest{Prefix: prefix, Context: context}
|
||||
|
||||
|
||||
@@ -25,5 +25,5 @@ func TestJobResource_PrefixList(t *testing.T) {
|
||||
|
||||
jobMatches := resp.Matches["jobs"]
|
||||
assert.Equal(1, len(jobMatches))
|
||||
assert.Equal(job.ID, jobMatches[0])
|
||||
assert.Equal(id, jobMatches[0])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user