Test Suite Using Ginkgo - #7
Conversation
| data | ||
| (struct { ResultType string "json:\"resultType\""; Result []e2e_tests.MatrixResult "json:\"result\"" }) { | ||
| ResultType: (string) (len=6) "matrix", | ||
| Result: ([]e2e_tests.MatrixResult) <nil> |
There was a problem hiding this comment.
Pretty much all the tests have Result: ([]e2e_tests.MatrixResult) <nil> . That's wrong. The result should be non-nil
| var seriesResp SeriesResponse | ||
| err = json.Unmarshal(body, &seriesResp) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
This snapshot should be for the response body as well. Not just for status.
| Expect(err).NotTo(HaveOccurred()) | ||
|
|
||
| Expect(resp.StatusCode).To(Equal(200)) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
This snapshot should be for the response body as well. Not just for status.
| resp, err := runRequest(fmt.Sprintf(`{test_id="%s"} | freq > 1 and (freq="4" or freq==2 or freq > 0.5)`, testID), 0, 0, 0, "", 0) | ||
| Expect(err).NotTo(HaveOccurred()) | ||
| adjustResult(resp, "", 0) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
This snapshot should be for the response body as well. Not just for status.
| Expect(err).NotTo(HaveOccurred()) | ||
| adjustResult(resp, "", 0) | ||
| err = cupaloy.New().SnapshotMulti( | ||
| "status", resp.Status, |
There was a problem hiding this comment.
This snapshot should be for the response body as well. Not just for status.
| Expect(err).ToNot(HaveOccurred()) | ||
| defer resp.Body.Close() | ||
| Expect(resp.StatusCode).To(Equal(200)) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
Remove this snapshot check.
| Expect(err).ToNot(HaveOccurred()) | ||
| defer resp.Body.Close() | ||
| Expect(resp.StatusCode).To(Equal(200)) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
Remove this snapshot check.
| Expect(err).ToNot(HaveOccurred()) | ||
| defer resp.Body.Close() | ||
| Expect(resp.StatusCode).To(Equal(200)) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
Remove this snapshot check.
| Expect(err).ToNot(HaveOccurred()) | ||
| defer resp.Body.Close() | ||
| Expect(resp.StatusCode).To(Equal(200)) | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
Remove this snapshot check.
| defer resp.Body.Close() | ||
| Expect(resp.StatusCode).To(Equal(401)) | ||
| } | ||
| err = cupaloy.New().SnapshotMulti( |
There was a problem hiding this comment.
Remove this snapshot check.
Implementation for #6