@@ -89,7 +89,7 @@ var _ = Describe("Issues Service", Ordered, func() {
8989 It ("should search issues with impact severities filter" , func () {
9090 result , resp , err := client .Issues .Search (& sonar.IssuesSearchOptions {
9191 Projects : []string {projectKey },
92- ImpactSeverities : []string {"HIGH" , "MEDIUM" },
92+ ImpactSeverities : []string {sonar . RuleImpactSeverityHigh , sonar . RuleImpactSeverityMedium },
9393 })
9494 Expect (err ).NotTo (HaveOccurred ())
9595 Expect (resp .StatusCode ).To (Equal (http .StatusOK ))
@@ -99,7 +99,7 @@ var _ = Describe("Issues Service", Ordered, func() {
9999 It ("should search issues with issue statuses filter" , func () {
100100 result , resp , err := client .Issues .Search (& sonar.IssuesSearchOptions {
101101 Projects : []string {projectKey },
102- IssueStatuses : []string {"OPEN" , "CONFIRMED" },
102+ IssueStatuses : []string {sonar . IssueStatusOpen , sonar . IssueStatusConfirmed },
103103 })
104104 Expect (err ).NotTo (HaveOccurred ())
105105 Expect (resp .StatusCode ).To (Equal (http .StatusOK ))
@@ -109,7 +109,7 @@ var _ = Describe("Issues Service", Ordered, func() {
109109 It ("should search issues with clean code categories filter" , func () {
110110 result , resp , err := client .Issues .Search (& sonar.IssuesSearchOptions {
111111 Projects : []string {projectKey },
112- CleanCodeAttributeCategories : []string {"INTENTIONAL" , "CONSISTENT" },
112+ CleanCodeAttributeCategories : []string {sonar . CleanCodeAttributeCategoryIntentional , sonar . CleanCodeAttributeCategoryConsistent },
113113 })
114114 Expect (err ).NotTo (HaveOccurred ())
115115 Expect (resp .StatusCode ).To (Equal (http .StatusOK ))
@@ -408,7 +408,7 @@ var _ = Describe("Issues Service", Ordered, func() {
408408
409409 It ("should fail without required issue key" , func () {
410410 result , resp , err := client .Issues .DoTransition (& sonar.IssuesDoTransitionOptions {
411- Transition : "confirm" ,
411+ Transition : sonar . IssueTransitionConfirm ,
412412 })
413413 Expect (err ).To (HaveOccurred ())
414414 Expect (err .Error ()).To (ContainSubstring ("Issue" ))
@@ -431,7 +431,7 @@ var _ = Describe("Issues Service", Ordered, func() {
431431 It ("should fail with non-existent issue key" , func () {
432432 result , resp , err := client .Issues .DoTransition (& sonar.IssuesDoTransitionOptions {
433433 Issue : nonExistentIssueKey ,
434- Transition : "confirm" ,
434+ Transition : sonar . IssueTransitionConfirm ,
435435 })
436436 Expect (err ).To (HaveOccurred ())
437437 Expect (result ).To (BeNil ())
@@ -498,7 +498,7 @@ var _ = Describe("Issues Service", Ordered, func() {
498498
499499 It ("should fail without required issue key" , func () {
500500 result , resp , err := client .Issues .SetSeverity (& sonar.IssuesSetSeverityOptions {
501- Severity : "MAJOR" ,
501+ Severity : sonar . RuleSeverityMajor ,
502502 })
503503 Expect (err ).To (HaveOccurred ())
504504 Expect (err .Error ()).To (ContainSubstring ("Issue" ))
@@ -511,7 +511,7 @@ var _ = Describe("Issues Service", Ordered, func() {
511511 It ("should fail with non-existent issue key" , func () {
512512 result , resp , err := client .Issues .SetSeverity (& sonar.IssuesSetSeverityOptions {
513513 Issue : nonExistentIssueKey ,
514- Severity : "MAJOR" ,
514+ Severity : sonar . RuleSeverityMajor ,
515515 })
516516 Expect (err ).To (HaveOccurred ())
517517 Expect (result ).To (BeNil ())
@@ -576,7 +576,7 @@ var _ = Describe("Issues Service", Ordered, func() {
576576
577577 It ("should fail without required issue key" , func () {
578578 result , resp , err := client .Issues .SetType (& sonar.IssuesSetTypeOptions {
579- Type : "BUG" ,
579+ Type : sonar . RuleTypeBug ,
580580 })
581581 Expect (err ).To (HaveOccurred ())
582582 Expect (err .Error ()).To (ContainSubstring ("Issue" ))
@@ -599,7 +599,7 @@ var _ = Describe("Issues Service", Ordered, func() {
599599 It ("should fail with non-existent issue key" , func () {
600600 result , resp , err := client .Issues .SetType (& sonar.IssuesSetTypeOptions {
601601 Issue : nonExistentIssueKey ,
602- Type : "BUG" ,
602+ Type : sonar . RuleTypeBug ,
603603 })
604604 Expect (err ).To (HaveOccurred ())
605605 Expect (result ).To (BeNil ())
0 commit comments