File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,8 +14,8 @@ import (
1414)
1515
1616var (
17- Version = "dev" //nolint:gochecknoglobals // We need this to be set at build
18- Commit = "<none>" //nolint:gochecknoglobals // We need this to be set at build
17+ Version = "dev" //nolint:gochecknoglobals // We need this to be set at build
18+ Commit = "-" //nolint:gochecknoglobals // We need this to be set at build
1919)
2020
2121func main () {
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ type TestCase struct {
3030 expectedCode int
3131 expectedBody string
3232 expectedContentType string
33- validateFunc func (t * testing.T , response map [string ]interface {} )
33+ validateFunc func (t * testing.T , response map [string ]any )
3434}
3535
3636func init () {
@@ -85,7 +85,7 @@ func runTestCases(t *testing.T, tests []TestCase) {
8585 assert .Nil (t , err )
8686
8787 if test .validateFunc != nil {
88- var bodyMap map [string ]interface {}
88+ var bodyMap map [string ]any
8989 err = json .Unmarshal (body , & bodyMap )
9090 assert .Nil (t , err )
9191
@@ -121,9 +121,9 @@ func TestStatusEndpoints(t *testing.T) {
121121 tests := []TestCase {
122122 {
123123 query : "GET /v1/status" ,
124- expectedCode : 204 ,
125- expectedBody : "" ,
126- expectedContentType : "" ,
124+ expectedCode : 200 ,
125+ expectedBody : `{"v":"dev","commit":"-"}` ,
126+ expectedContentType : "application/json " ,
127127 // TODO: test cache headers
128128 },
129129 }
You can’t perform that action at this time.
0 commit comments