Skip to content

Commit 8f23657

Browse files
authored
fix(api): Fix api test for health check by ignoring version number
Merge pull request #1560 from qri-io/api-test-fix
2 parents 7bfb2ee + f0b7518 commit 8f23657

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

api/api_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,12 @@ func confirmQriNotRunning() error {
149149
}
150150

151151
func TestHealthCheck(t *testing.T) {
152+
prevAPIVer := APIVersion
153+
APIVersion = "test_version"
154+
defer func() {
155+
APIVersion = prevAPIVer
156+
}()
157+
152158
healthCheckCases := []handlerTestCase{
153159
{"OPTIONS", "/", nil},
154160
{"GET", "/", nil},

api/testdata/api.snapshot

4 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)