Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(rest): Create new endpoint for LicenseType in admin tab #2147

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

nikkuma7
Copy link
Contributor

@nikkuma7 nikkuma7 commented Oct 12, 2023

Please provide a summary of your changes here.

  • Which issue is this pull request belonging to and how is it solving it? (Refer to issue here)
  • Did you add or update any new dependencies that are required for your change?

Issue: #2146

Suggest Reviewer

You can suggest reviewers here with an @mention.

How To Test?

1: Login with Admin user.
Sample URL : http://localhost:8080/resource/api/licenses/addLicenseType

How should these changes be tested by the reviewer?
Have you implemented any additional tests?

Checklist

Must:

  • All related issues are referenced in commit messages and in PR

@rudra-superrr rudra-superrr added the WIP work in progress label Oct 12, 2023
@nikkuma7 nikkuma7 changed the title fix(rest): Added new endpoint for LicenseType in admin tab fix(rest): Create new endpoint for LicenseType in admin tab Oct 12, 2023
@ag4ums ag4ums added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for New-UI Level for the API and UI level changes for the new-ui and removed WIP work in progress labels Oct 16, 2023
@rudra-superrr rudra-superrr self-assigned this Oct 23, 2023
@@ -142,3 +142,15 @@ include::{snippets}/should_document_import_osadl_info/curl-request.adoc[]

===== Example response
include::{snippets}/should_document_import_osadl_info/http-response.adoc[]

[[add-license-type]]
==== create license type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change it to Create license type.

==== create license type

A `POST` request help to create license type.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add request parameter for your POST request

public void should_document_import_osadl_info() throws Exception {
String accessToken = TestHelper.getAccessToken(mockMvc, testUserId, testUserPassword);
mockMvc.perform(post("/api/licenses/import/OSADL")
.header("Authorization", "Bearer " + accessToken)
.accept(MediaTypes.HAL_JSON))
.andExpect(status().isOk());
}

@Test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use proper indentation

@rudra-superrr
Copy link
Contributor

image

Testing failed.

@nikkuma7
Copy link
Contributor Author

As per your above comment, code has modified. Please retest.

@nikkuma7 nikkuma7 force-pushed the fix/AdminCreateLicenseType branch 3 times, most recently from d861d16 to 98993c0 Compare October 30, 2023 12:43
@rudra-superrr
Copy link
Contributor

Testing was successful.

@rudra-superrr rudra-superrr removed the needs general test This is general testing, meaning that there is no org specific issue to check for label Oct 31, 2023
@@ -126,19 +126,57 @@ include::{snippets}/should_document_get_download_license_archive/http-response.a

A `POST` request will upload license file.

[black]#Request parameter#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

don't style the headings with black.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done.

@rudra-superrr
Copy link
Contributor

Code looks good.

@rudra-superrr rudra-superrr added ready ready to merge and removed needs code review labels Nov 2, 2023
@ag4ums ag4ums merged commit f3f19b7 into eclipse-sw360:main Nov 7, 2023
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New-UI Level for the API and UI level changes for the new-ui ready ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants