-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2077 from toshiba/release/feat_cots-details-infor…
…mation-in-release-response Fix(REST): Add COTS details information when fetch a single release that has component type COTS Reviewed by: [email protected] Tested by: [email protected]
- Loading branch information
Showing
2 changed files
with
24 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,7 +185,7 @@ public void before() throws TException, IOException { | |
component.setDescription("Angular is a development platform for building mobile and desktop web applications."); | ||
component.setCreatedOn("2016-12-15"); | ||
component.setCreatedBy("[email protected]"); | ||
component.setComponentType(ComponentType.OSS); | ||
component.setComponentType(ComponentType.COTS); | ||
component.setVendorNames(new HashSet<>(Collections.singletonList("Google"))); | ||
component.setModerators(new HashSet<>(Arrays.asList("[email protected]", "[email protected]"))); | ||
usedByComponent.add(component); | ||
|
@@ -221,6 +221,10 @@ public void before() throws TException, IOException { | |
clearingInformation.setComponentClearingReportIsSet(false); | ||
clearingInformation.setExternalUrl("https://external.url"); | ||
|
||
COTSDetails cotsDetails1 = new COTSDetails().setClearingDeadline("2016-12-18").setContainsOSS(true) | ||
.setCotsResponsible("[email protected]").setLicenseClearingReportURL("http://licenseclearingreporturl.com") | ||
.setOssInformationURL("http://ossinformationurl.com").setUsedLicense("MIT"); | ||
|
||
release.setId(releaseId); | ||
owner.setReleaseId(release.getId()); | ||
release.setName("Spring Core 4.3.4"); | ||
|
@@ -250,6 +254,8 @@ public void before() throws TException, IOException { | |
release.setSoftwarePlatforms(new HashSet<>(Arrays.asList("Java SE", ".NET"))); | ||
release.setEccInformation(eccInformation); | ||
release.setClearingInformation(clearingInformation); | ||
release.setCotsDetails(cotsDetails1); | ||
release.setComponentType(ComponentType.COTS); | ||
|
||
Set<String> licenseIds = new HashSet<>(); | ||
licenseIds.add("MIT"); | ||
|
@@ -695,6 +701,7 @@ public void should_document_get_release() throws Exception { | |
subsectionWithPath("_embedded.sw360:modifiedBy").description("A release modifiedBy with email and link to their <<resources-user-get,User resource>>"), | ||
subsectionWithPath("_embedded.sw360:createdBy").description("A release createdBy with email and link to their <<resources-user-get,User resource>>"), | ||
subsectionWithPath("_embedded.sw360:attachments").description("An array of all release attachments and link to their <<resources-attachment-get,Attachment resource>>"), | ||
subsectionWithPath("_embedded.sw360:cotsDetails").description("Cots details information of release has component type = COTS "), | ||
subsectionWithPath("_links").description("<<resources-index-links,Links>> to other resources") | ||
))); | ||
} | ||
|