Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tavern/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import (
)

type Status struct {
OKStatusText string
Pubkey string
OKStatusText string `json:"OKStatusText"`
Pubkey string `json:"Pubkey"`
Version string `json:"version"`
}

// OKStatusText is the body returned by the status handler when everything is running as expected.
Expand All @@ -26,6 +27,7 @@ func newStatusHandler() http.HandlerFunc {
res, err := json.Marshal(Status{
OKStatusText: OKStatusText,
Pubkey: pubStr,
Version: Version,
})
if err != nil {
panic(err)
Expand Down
1 change: 1 addition & 0 deletions tavern/status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ func TestStatusHandler(t *testing.T) {

assert.Equal(t, tc.wantCode, tc.w.Code)
assert.Contains(t, string(body), tc.wantBody)
assert.Contains(t, string(body), "\"version\":\"" + Version + "\"")
}
}
2 changes: 1 addition & 1 deletion tavern/version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package main

// Version of Tavern being run
const Version = "v0.3.2"
const Version = "0.3.3"
Loading