forked from IBM/test-infra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add 17: open_bug_template to config.proto
Used to identify the source repository when linking bugs to issues
- Loading branch information
Showing
6 changed files
with
88 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ import ( | |
|
||
const ProwDefaultGCSPath = "pathPrefix/" | ||
const ProwJobName = "TestJob" | ||
const ExampleRepository = "test/repo" | ||
|
||
func Test_applySingleProwjobAnnotations(t *testing.T) { | ||
tests := []struct { | ||
|
@@ -134,6 +135,9 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
@@ -178,6 +182,9 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
AlertOptions: &config.DashboardTabAlertOptions{ | ||
AlertMailToAddresses: "[email protected]", | ||
}, | ||
|
@@ -194,6 +201,9 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
@@ -249,6 +259,9 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
@@ -296,6 +309,9 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
@@ -320,7 +336,7 @@ func Test_applySingleProwjobAnnotations(t *testing.T) { | |
Annotations: test.annotations, | ||
} | ||
|
||
err := applySingleProwjobAnnotations(result, fakeProwConfig(), job, test.prowJobType, "test/repo") | ||
err := applySingleProwjobAnnotations(result, fakeProwConfig(), job, test.prowJobType, ExampleRepository) | ||
|
||
if test.expectedConfig == nil { | ||
if err == nil { | ||
|
@@ -343,8 +359,8 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
|
||
defaultConfig := &config.DefaultConfiguration{ | ||
DefaultTestGroup: &config.TestGroup{ | ||
GcsPrefix: "originalConfigPrefix", //Overwritten | ||
DaysOfResults: 5, //Kept | ||
GcsPrefix: "originalConfigPrefix", //Default is Overwritten | ||
DaysOfResults: 5, //Default is Kept | ||
NumColumnsRecent: 10, //Sometimes Overwritten; see test | ||
}, | ||
DefaultDashboardTab: &config.DashboardTab{ | ||
|
@@ -354,6 +370,12 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
AlertOptions: &config.DashboardTabAlertOptions{ | ||
AlertMailToAddresses: "[email protected]", //Kept; see test | ||
}, | ||
CodeSearchUrlTemplate: &config.LinkTemplate{ //Overwritten | ||
Url: "https://example.com/code_search", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ //Overwritten | ||
Url: "https://example.com/open_bug", | ||
}, | ||
}, | ||
} | ||
|
||
|
@@ -438,6 +460,9 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
AlertOptions: &config.DashboardTabAlertOptions{ | ||
AlertMailToAddresses: "[email protected]", | ||
}, | ||
|
@@ -483,6 +508,9 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
AlertOptions: &config.DashboardTabAlertOptions{ | ||
AlertMailToAddresses: "[email protected]", | ||
}, | ||
|
@@ -500,6 +528,9 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
CodeSearchUrlTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/compare/<start-custom-0>...<end-custom-0>", | ||
}, | ||
OpenBugTemplate: &config.LinkTemplate{ | ||
Url: "https://github.com/test/repo/issues/", | ||
}, | ||
AlertOptions: &config.DashboardTabAlertOptions{ | ||
AlertMailToAddresses: "[email protected]", | ||
}, | ||
|
@@ -528,7 +559,7 @@ func Test_applySingleProwjobAnnotation_WithDefaults(t *testing.T) { | |
Annotations: test.annotations, | ||
} | ||
|
||
err := applySingleProwjobAnnotations(result, fakeProwConfig(), job, test.prowJobType, "test/repo") | ||
err := applySingleProwjobAnnotations(result, fakeProwConfig(), job, test.prowJobType, ExampleRepository) | ||
|
||
if test.expectedConfig == nil { | ||
if err == nil { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters