2017-07-28 21:48:15 +00:00
|
|
|
package agent
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/http"
|
|
|
|
"net/http/httptest"
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/hashicorp/nomad/nomad/mock"
|
|
|
|
"github.com/hashicorp/nomad/nomad/structs"
|
2017-08-14 13:34:31 +00:00
|
|
|
"github.com/stretchr/testify/assert"
|
2017-07-28 21:48:15 +00:00
|
|
|
)
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_SearchWithIllegalMethod(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-07-28 21:48:15 +00:00
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
2017-08-11 14:44:46 +00:00
|
|
|
req, err := http.NewRequest("DELETE", "/v1/search", nil)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-07-28 21:48:15 +00:00
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
_, err = s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.NotNil(err, "HTTP DELETE should not be accepted for this endpoint")
|
2017-07-28 21:48:15 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
func createJobForTest(jobID string, s *TestAgent, t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-07-28 21:48:15 +00:00
|
|
|
job := mock.Job()
|
|
|
|
job.ID = jobID
|
|
|
|
job.TaskGroups[0].Count = 1
|
2017-08-02 20:05:10 +00:00
|
|
|
|
|
|
|
state := s.Agent.server.State()
|
2020-10-19 13:30:15 +00:00
|
|
|
err := state.UpsertJob(structs.MsgTypeTestSetup, 1000, job)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-07-28 21:48:15 +00:00
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_POST(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-07-28 21:48:15 +00:00
|
|
|
testJob := "aaaaaaaa-e8f7-fd38-c855-ab94ceb89706"
|
2017-08-01 19:33:40 +00:00
|
|
|
testJobPrefix := "aaaaaaaa-e8f7-fd38"
|
2017-07-28 21:48:15 +00:00
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
createJobForTest(testJob, s, t)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: testJobPrefix, Context: structs.Jobs}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-02 15:57:19 +00:00
|
|
|
|
2017-07-28 21:48:15 +00:00
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-07-28 21:48:15 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
2017-07-28 21:48:15 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
j := res.Matches[structs.Jobs]
|
2017-07-28 21:48:15 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(j))
|
|
|
|
assert.Equal(j[0], testJob)
|
2017-08-04 14:18:46 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Jobs], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.NotEqual("0", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-07-28 21:48:15 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_PUT(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-08-03 15:12:14 +00:00
|
|
|
testJob := "aaaaaaaa-e8f7-fd38-c855-ab94ceb89706"
|
|
|
|
testJobPrefix := "aaaaaaaa-e8f7-fd38"
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
createJobForTest(testJob, s, t)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: testJobPrefix, Context: structs.Jobs}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("PUT", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:12:14 +00:00
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:12:14 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
2017-08-03 15:12:14 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
j := res.Matches[structs.Jobs]
|
2017-08-03 15:12:14 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(j))
|
|
|
|
assert.Equal(j[0], testJob)
|
2017-08-04 14:18:46 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Jobs], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.NotEqual("0", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-08-03 15:12:14 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_MultipleJobs(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-08-01 19:59:19 +00:00
|
|
|
testJobA := "aaaaaaaa-e8f7-fd38-c855-ab94ceb89706"
|
|
|
|
testJobB := "aaaaaaaa-e8f7-fd38-c855-ab94ceb89707"
|
|
|
|
testJobC := "bbbbbbbb-e8f7-fd38-c855-ab94ceb89707"
|
|
|
|
|
|
|
|
testJobPrefix := "aaaaaaaa-e8f7-fd38"
|
|
|
|
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
createJobForTest(testJobA, s, t)
|
|
|
|
createJobForTest(testJobB, s, t)
|
|
|
|
createJobForTest(testJobC, s, t)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: testJobPrefix, Context: structs.Jobs}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-02 15:57:19 +00:00
|
|
|
|
2017-08-01 19:59:19 +00:00
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-01 19:59:19 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
2017-08-01 19:59:19 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
j := res.Matches[structs.Jobs]
|
2017-08-01 19:59:19 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(2, len(j))
|
|
|
|
assert.Contains(j, testJobA)
|
|
|
|
assert.Contains(j, testJobB)
|
|
|
|
assert.NotContains(j, testJobC)
|
2017-08-04 14:18:46 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Jobs], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.NotEqual("0", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-08-01 19:59:19 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_Evaluation(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-08-02 17:21:58 +00:00
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
state := s.Agent.server.State()
|
|
|
|
eval1 := mock.Eval()
|
|
|
|
eval2 := mock.Eval()
|
2020-10-19 13:30:15 +00:00
|
|
|
err := state.UpsertEvals(structs.MsgTypeTestSetup, 9000, []*structs.Evaluation{eval1, eval2})
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-02 17:21:58 +00:00
|
|
|
|
2017-08-04 14:18:46 +00:00
|
|
|
prefix := eval1.ID[:len(eval1.ID)-2]
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: prefix, Context: structs.Evals}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
2017-08-02 17:21:58 +00:00
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-02 17:21:58 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
2017-08-02 17:21:58 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
j := res.Matches[structs.Evals]
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(j))
|
|
|
|
assert.Contains(j, eval1.ID)
|
|
|
|
assert.NotContains(j, eval2.ID)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Evals], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal("9000", respW.HeaderMap.Get("X-Nomad-Index"))
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_Allocations(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
state := s.Agent.server.State()
|
|
|
|
alloc := mock.Alloc()
|
2020-10-19 13:30:15 +00:00
|
|
|
err := state.UpsertAllocs(structs.MsgTypeTestSetup, 7000, []*structs.Allocation{alloc})
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
prefix := alloc.ID[:len(alloc.ID)-2]
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: prefix, Context: structs.Allocs}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-04 14:18:46 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
a := res.Matches[structs.Allocs]
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(a))
|
|
|
|
assert.Contains(a, alloc.ID)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Allocs], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal("7000", respW.HeaderMap.Get("X-Nomad-Index"))
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_Nodes(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
state := s.Agent.server.State()
|
|
|
|
node := mock.Node()
|
2020-10-19 13:30:15 +00:00
|
|
|
err := state.UpsertNode(structs.MsgTypeTestSetup, 6000, node)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
prefix := node.ID[:len(node.ID)-2]
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: prefix, Context: structs.Nodes}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
|
|
|
assert.Equal(1, len(res.Matches))
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
n := res.Matches[structs.Nodes]
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(n))
|
|
|
|
assert.Contains(n, node.ID)
|
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(res.Truncations[structs.Nodes], false)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal("6000", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-08-02 17:21:58 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-18 20:06:25 +00:00
|
|
|
func TestHTTP_Search_Deployments(t *testing.T) {
|
|
|
|
assert := assert.New(t)
|
|
|
|
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
state := s.Agent.server.State()
|
|
|
|
deployment := mock.Deployment()
|
|
|
|
assert.Nil(state.UpsertDeployment(999, deployment), "UpsertDeployment")
|
|
|
|
|
|
|
|
prefix := deployment.ID[:len(deployment.ID)-2]
|
|
|
|
data := structs.SearchRequest{Prefix: prefix, Context: structs.Deployments}
|
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
|
|
|
assert.Nil(err)
|
|
|
|
|
|
|
|
res := resp.(structs.SearchResponse)
|
|
|
|
|
|
|
|
assert.Equal(1, len(res.Matches))
|
|
|
|
|
|
|
|
n := res.Matches[structs.Deployments]
|
|
|
|
assert.Equal(1, len(n))
|
|
|
|
assert.Contains(n, deployment.ID)
|
|
|
|
|
|
|
|
assert.Equal("999", respW.HeaderMap.Get("X-Nomad-Index"))
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
func TestHTTP_Search_NoJob(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-08-03 15:59:27 +00:00
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: "12345", Context: structs.Jobs}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(res.Matches))
|
2017-08-11 21:21:35 +00:00
|
|
|
assert.Equal(0, len(res.Matches[structs.Jobs]))
|
2017-08-04 14:18:46 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal("0", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-08-03 15:59:27 +00:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2017-08-11 14:44:46 +00:00
|
|
|
func TestHTTP_Search_AllContext(t *testing.T) {
|
2017-08-14 13:34:31 +00:00
|
|
|
assert := assert.New(t)
|
2017-08-04 19:28:12 +00:00
|
|
|
|
2017-08-03 15:59:27 +00:00
|
|
|
testJobID := "aaaaaaaa-e8f7-fd38-c855-ab94ceb89706"
|
|
|
|
testJobPrefix := "aaaaaaaa-e8f7-fd38"
|
|
|
|
t.Parallel()
|
|
|
|
httpTest(t, nil, func(s *TestAgent) {
|
|
|
|
createJobForTest(testJobID, s, t)
|
|
|
|
|
|
|
|
state := s.Agent.server.State()
|
|
|
|
eval1 := mock.Eval()
|
|
|
|
eval1.ID = testJobID
|
2020-10-19 13:30:15 +00:00
|
|
|
err := state.UpsertEvals(structs.MsgTypeTestSetup, 8000, []*structs.Evaluation{eval1})
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
data := structs.SearchRequest{Prefix: testJobPrefix, Context: structs.All}
|
2017-08-10 19:24:11 +00:00
|
|
|
req, err := http.NewRequest("POST", "/v1/search", encodeReq(data))
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
|
|
|
respW := httptest.NewRecorder()
|
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
resp, err := s.Server.SearchRequest(respW, req)
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Nil(err)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-10 19:24:11 +00:00
|
|
|
res := resp.(structs.SearchResponse)
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-11 21:21:35 +00:00
|
|
|
matchedJobs := res.Matches[structs.Jobs]
|
|
|
|
matchedEvals := res.Matches[structs.Evals]
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(1, len(matchedJobs))
|
|
|
|
assert.Equal(1, len(matchedEvals))
|
2017-08-03 15:59:27 +00:00
|
|
|
|
2017-08-04 19:28:12 +00:00
|
|
|
assert.Equal(matchedJobs[0], testJobID)
|
|
|
|
assert.Equal(matchedEvals[0], eval1.ID)
|
2017-08-04 20:14:41 +00:00
|
|
|
|
|
|
|
assert.Equal("8000", respW.HeaderMap.Get("X-Nomad-Index"))
|
2017-08-03 15:59:27 +00:00
|
|
|
})
|
|
|
|
}
|