Skip to content

Commit

Permalink
Set test summary for empty description in TCR (#837) Cherry-pick to 3…
Browse files Browse the repository at this point in the history
….x (#839)

* Set test summary for empty description in TCR and added getTestDescription test
# Conflicts:
#	src/org/ods/orchestration/usecase/LeVADocumentUseCase.groovy
* Fixed test
  • Loading branch information
angelmp01 committed Feb 2, 2022
1 parent 5eb9752 commit a119b22
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
- Fix Traceability matrix NULL ([#817](https://github.com/opendevstack/ods-jenkins-shared-library/pull/817)
- rerunning of master pipeline after dev release via release-manager ([#793](https://github.com/opendevstack/ods-jenkins-shared-library/pull/793))
- Fix RM: *found unexecuted Jira tests* error during promote2Production when functional test only runs on D and QA ([#832](https://github.com/opendevstack/ods-jenkins-shared-library/pull/832))
- Set test summary for empty description in TCR ([#837](https://github.com/opendevstack/ods-jenkins-shared-library/pull/837))

## [3.0] - 2020-08-11

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ class LeVADocumentUseCase extends DocGenUseCase {
integrationTests : SortUtil.sortIssuesByKey(integrationTestIssues.collect { testIssue ->
[
key : testIssue.key,
description : testIssue.description,
description : getTestDescription(testIssue),
requirements: testIssue.requirements ? testIssue.requirements.join(", ") : "N/A",
isSuccess : testIssue.isSuccess,
bugs : testIssue.bugs ? testIssue.bugs.join(", ") : (testIssue.comment ? "": "N/A"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1772,4 +1772,23 @@ class LeVADocumentUseCaseSpec extends SpecHelper {
'ab-c-d' | 'ab‑c‑d'
}

def "getTestDescription"(testIssue, expected) {
given:
LeVADocumentUseCase leVADocumentUseCase = new LeVADocumentUseCase(null, null, null,
null, null, null, null, null, null, null,
null, null)

when:
def result = leVADocumentUseCase.getTestDescription(testIssue)

then:
result == expected

where:
testIssue | expected
[name: '',description: ''] | 'N/A'
[name: 'NAME',description: ''] | 'NAME'
[name: '',description: 'DESCRIPTION'] | 'DESCRIPTION'
[name: 'NAME',description: 'DESCRIPTION'] | 'DESCRIPTION'
}
}

0 comments on commit a119b22

Please sign in to comment.