Skip to content

Commit

Permalink
check leader & gitCommit not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bbklab committed Aug 1, 2017
1 parent 4772481 commit bf3e482
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion integration-test/swan_api_leader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ func (s *ApiSuite) TestGetLeader(c *check.C) {
c.Assert(err, check.IsNil)
c.Assert(code, check.Equals, http.StatusOK)

err = s.bind(body, new(types.Leader))
var leader = new(types.Leader)
err = s.bind(body, leader)
c.Assert(err, check.IsNil)
c.Assert(leader.Leader, check.Not(check.Equals), "")
}
6 changes: 5 additions & 1 deletion integration-test/swan_api_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ func (s *ApiSuite) TestGetVersion(c *check.C) {
c.Assert(err, check.IsNil)
c.Assert(code, check.Equals, http.StatusOK)

err = s.bind(body, new(version.Version))
var gitVersion = new(version.Version)
err = s.bind(body, gitVersion)
c.Assert(err, check.IsNil)
c.Assert(gitVersion.GitCommit, check.Not(check.Equals), "")
c.Assert(gitVersion.BuildTime, check.Not(check.Equals), "")
c.Assert(gitVersion.GoVersion, check.Not(check.Equals), "")
}

0 comments on commit bf3e482

Please sign in to comment.