fix failing test assertion

small refactors
This commit is contained in:
Chelsea Holland Komlo
2017-08-09 19:45:47 +00:00
parent 34bb3d36bd
commit a45bf60c22
2 changed files with 2 additions and 2 deletions

View File

@@ -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}

View File

@@ -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])
}