Mock ntg search job info

This commit is contained in:
Bel LaPointe
2022-01-14 10:40:49 -05:00
parent 6f972d71ba
commit bda1fd6f15
6 changed files with 133 additions and 48 deletions

View File

@@ -20,3 +20,9 @@ func (ntgm NTGVisionMock) search(states []config.State) (io.ReadCloser, error) {
b, err := ioutil.ReadFile(path)
return io.NopCloser(bytes.NewReader(b)), err
}
func (ntgm NTGVisionMock) searchJob(id int64) (io.ReadCloser, error) {
path := path.Join(os.Getenv("GOPATH"), "src", "local", "truckstop", "broker", "testdata", "ntgvision_jobinfo_response.json")
b, err := ioutil.ReadFile(path)
return io.NopCloser(bytes.NewReader(b)), err
}