Skip to content

Commit

Permalink
added regexp for version returned
Browse files Browse the repository at this point in the history
  • Loading branch information
faboweb authored and ebuchman committed Mar 17, 2018
1 parent 0121c98 commit ef88f34
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions client/lcd/lcd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,10 @@ func TestVersion(t *testing.T) {
res := request(t, r, "GET", "/version", nil)
require.Equal(t, http.StatusOK, res.Code, res.Body.String())

// TODO fix regexp
// reg, err := regexp.Compile(`v\d+\.\d+\.\d+(-dev)?`)
// require.Nil(t, err)
// match := reg.MatchString(res.Body.String())
// assert.True(t, match, res.Body.String())
assert.Equal(t, "0.11.1-dev", res.Body.String())
reg, err := regexp.Compile(`\d+\.\d+\.\d+(-dev)?`)
require.Nil(t, err)
match := reg.MatchString(res.Body.String())
assert.True(t, match, res.Body.String())
}

func TestNodeStatus(t *testing.T) {
Expand Down

0 comments on commit ef88f34

Please sign in to comment.