Skip to content

Commit

Permalink
Re-enable query test and fix it
Browse files Browse the repository at this point in the history
This test was originally broken here:
1eea784

We stopped using Prettify in `collapse` here:
980eb71

This means the `query` command is the only user of Prettify so we can
change it back.
  • Loading branch information
Zachary Scott committed Jun 22, 2018
1 parent 3c8a318 commit d6897de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion cmd/query_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ var _ = Describe("Query", func() {
}
}
`

server.AppendHandlers(
ghttp.CombineHandlers(
ghttp.VerifyRequest("POST", "/"),
Expand All @@ -96,7 +97,7 @@ var _ = Describe("Query", func() {
Expect(err).ShouldNot(HaveOccurred())
session.Wait()
Eventually(session.Err.Contents()).Should(BeEmpty())
//Eventually(session.Out.Contents()).Should(MatchJSON(responseData))
Eventually(session.Out.Contents()).Should(MatchJSON(responseData))
Eventually(session).Should(gexec.Exit(0))
})
})
Expand Down
4 changes: 2 additions & 2 deletions logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ func (l *Logger) FatalOnError(msg string, err error) {
}
}

// Prettyify accepts a map fo data and pretty prints it.
// Prettyify accepts a map of data and pretty prints it.
// It's using json.MarshalIndent and printing with log.Logger.Infoln
func (l *Logger) Prettyify(data ...interface{}) {
func (l *Logger) Prettyify(data map[string]interface{}) {
bytes, err := json.MarshalIndent(data, "", " ")
if err != nil {
l.error.Fatalln(err)
Expand Down

0 comments on commit d6897de

Please sign in to comment.