From a45bf60c221cebbcf1ae6ab873cd3c0bf8126012 Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Wed, 9 Aug 2017 19:45:47 +0000 Subject: [PATCH] fix failing test assertion small refactors --- api/job_resources.go | 2 +- api/job_resources_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/job_resources.go b/api/job_resources.go index fb8cb01ab..b1398b969 100644 --- a/api/job_resources.go +++ b/api/job_resources.go @@ -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} diff --git a/api/job_resources_test.go b/api/job_resources_test.go index 4c347e6d0..cf5b1c213 100644 --- a/api/job_resources_test.go +++ b/api/job_resources_test.go @@ -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]) }