Skip to content

Commit

Permalink
Release 4.5.5 (#1149)
Browse files Browse the repository at this point in the history
  • Loading branch information
BraisVQ committed Aug 26, 2024
1 parent 5073b38 commit a30abee
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
### Fixed
* Fix Tailor deployment drifts for D, Q envs ([#1055](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1055))

## [4.5.5] - 2024-08-26

### Fixed
* Fix NPE when the test type is null ([#1146](https://github.com/opendevstack/ods-jenkins-shared-library/pull/1146))

## [4.5.4] - 2024-07-17

### Changed
Expand Down
2 changes: 1 addition & 1 deletion src/org/ods/orchestration/util/Project.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ class Project {
boolean hasGivenTypes(List<String> testTypes, testIssue) {
def result = true
if (testTypes) {
result = testTypes*.toLowerCase().contains(testIssue.testType.toLowerCase())
result = testTypes*.toLowerCase().contains(testIssue.testType?.toLowerCase())
}
return result
}
Expand Down
18 changes: 18 additions & 0 deletions test/groovy/org/ods/orchestration/util/ProjectSpec.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -3255,4 +3255,22 @@ class ProjectSpec extends SpecHelper {
!result
}

def "check hasGivenTypes"() {
given:
def projectObj = new Project(steps, logger)

when:
def resulFromExecution = projectObj.hasGivenTypes(testTypes, testIssue)

then:
result == resulFromExecution

where:
testTypes | testIssue | result
['Unit', 'Integration', 'Installation', 'Acceptance'] | [testType: 'Unit'] | true
['Integration', 'Installation', 'Acceptance'] | [testType: 'Unit'] | false
['Unit', 'Integration', 'Installation', 'Acceptance'] | [testType: null] | false
['Unit', 'Integration', 'Installation', 'Acceptance'] | [:] | false
}

}

0 comments on commit a30abee

Please sign in to comment.