Skip to content

Commit

Permalink
Add tests for gRPC interceptors
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos Martín <[email protected]>
  • Loading branch information
carlosms committed Jan 25, 2019
1 parent 1a50036 commit 6ba788a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cmd/server-test/dummy_analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ func (suite *DummyIntegrationSuite) TestSuccessReview() {
})
}

func (suite *DummyIntegrationSuite) TestGRPCLogs() {
// Check that 'event-id' log field is sent from lookoutd to the dummy analyzer,
// and then received back when receiving a grpc call from the analyzer.
suite.sendEvent(successJSON)
suite.GrepAll(suite.r, []string{
`processing pull request`,
`msg="gRPC streaming server call started" analyzer=Dummy app=lookoutd event-id=16ee0f607886b841c7633ab4cea5334cbc2022a1 event-type="*pb.ReviewEvent" grpc.method=GetChanges`,
`status=success`,
})
}

func (suite *DummyIntegrationSuite) TestReviewDontPostSameComment() {
fixture := fixtures.GetByName("incremental-pr")

Expand Down

0 comments on commit 6ba788a

Please sign in to comment.