Skip to content

Commit

Permalink
adding a general test
Browse files Browse the repository at this point in the history
  • Loading branch information
aalsabag committed Nov 11, 2020
1 parent 3f9491b commit 194a137
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions listener/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,33 @@ import (
)

var _ = Describe("Listener", func() {

var generalEvent *Event

BeforeEach(func() {
generalEvent = &Event{
TaskID: "AXW39ga8rPJdWZ8bmqZS",
Status: "SUCCESS",
AnalyzedAt: "2020-11-11T15:39:05+0000",
GitCommit: "e4834abbbd161241694224b3b91950b3d504a3a3",
Project: &Project{
Key: "org.springframework.nanotrader:springtrader-marketSummary",
Name: "springtrader-marketSummary",
URL: "http://localhost:9000/dashboard?id=org.springframework.nanotrader%3Aspringtrader-marketSummary",
},
Properties: map[string]string{
"sonar.analysis.resourceUriPrefix": "https://github.com/liatrio/springtrader-marketsummary-java",
},
}
})
Describe("Deteriming Resource URI", func() {
Context("When Using Sonarqube Community Edition", func() {
It("should be based on a passed in resource uri prefix", func() {
Expect(getRepoFromSonar(generalEvent)).To(Equal("https://github.com/liatrio/springtrader-marketsummary-java:e4834abbbd161241694224b3b91950b3d504a3a3"))
})
})

})
Describe("Process incoming event", func() {
Context("With new valid event", func() {
It("Should not error out", func() {
Expand Down

0 comments on commit 194a137

Please sign in to comment.