Skip to content

Commit

Permalink
fix(release-automation): exception function call at unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaszbarwicki committed Mar 7, 2024
1 parent a753b0d commit da4ed88
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions release-automation/internal/exception/exception_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
)

func TestShouldPassIfParsesExceptionDataFile(t *testing.T) {
config := getExceptionsFromFile("test/exceptions_test.yaml")
config, _ := GetExceptionsFromFile("test/exceptions_test.yaml")
for _,e := range config.Exceptions {
if e.Trg == "1.23" {
for _, r := range e.Repositories {
Expand All @@ -38,14 +38,14 @@ func TestShouldPassIfParsesExceptionDataFile(t *testing.T) {
}

func TestShouldPassIfExceptionExistForSpecificRepository(t *testing.T) {
config := getExceptionsFromFile("test/exceptions_test.yaml")
config, _ := GetExceptionsFromFile("test/exceptions_test.yaml")
if !config.IsExceptioned("1.23", "testing-repo") {
t.Errorf("Test should pass, test data contains the exception.")
}
}

func TestShouldFailIfExceptionExistForSpecificRepository(t *testing.T) {
config := getExceptionsFromFile("test/exceptions_test.yaml")
config, _ := GetExceptionsFromFile("test/exceptions_test.yaml")
if config.IsExceptioned("1.23", "no-exception-repo") {
t.Errorf("Test should fail, there is no exception for testing repo.")
}
Expand Down

0 comments on commit da4ed88

Please sign in to comment.