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

Add DCR integration tests #18491

Open
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

SachiniSiriwardene
Copy link
Contributor

No description provided.

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/7138883250

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/7138883250
Status: success

Copy link
Contributor

@jenkins-is-staging jenkins-is-staging left a comment

Choose a reason for hiding this comment

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

Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/7138883250

@@ -0,0 +1,191 @@
/*
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please check the license header, I think latest one should be

/**
 * Copyright (c) 2022, WSO2 LLC. (https://www.wso2.com/).
 *
 * WSO2 LLC. licenses this file to you under the Apache License,
 * Version 2.0 (the "License"); you may not use this file except
 * in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

Copy link
Contributor

Choose a reason for hiding this comment

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

Mail: License Header for WSO2 code

Copy link
Contributor Author

Choose a reason for hiding this comment

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

updated

@@ -98,7 +98,7 @@ private static Object[][] dcrConfigProvider() throws Exception {
getRegisterRequestJSON("request2.json"), getUpdateRequestJSON("request2.json"), ADMIN_USERNAME,
ADMIN_PASSWORD, SUPER_TENANT_DOMAIN
}
};
};
Copy link
Contributor

Choose a reason for hiding this comment

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

is this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

removed

@@ -121,8 +118,8 @@ public void testCreateServiceProviderRequest() throws IOException {
@Test(alwaysRun = true, groups = "wso2.is", priority = 2, description =
"Create a service provider with already registered client name")
public void testCreateServiceProviderRequestWithExistingClientName() throws IOException {
HttpPost request = new HttpPost(getPath());
request.addHeader(HttpHeaders.AUTHORIZATION, getAuthzHeader());
HttpPost request = new HttpPost(DCRUtils.getPath(tenant));
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's add a new line after method signature, please check other places too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

@@ -74,18 +74,15 @@ public OAuthDCRMTestCase(TestUserMode userMode) throws Exception {
public static Object[][] dcrmConfigProvider() {
return new Object[][]{{TestUserMode.SUPER_TENANT_ADMIN}, {TestUserMode.TENANT_ADMIN}};
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep this seperator

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

}
public static String getAuthzHeader(String username, String password) {

return "Basic " + Base64.encodeBase64String((username + ":" + password).getBytes()).trim();
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

request.addHeader(HttpHeaders.CONTENT_TYPE, OAuthDCRMConstants.CONTENT_TYPE);
}

public static String getPath(String tenant) {
Copy link
Contributor

Choose a reason for hiding this comment

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

can we reuse following Util method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

replaced

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/7382144042

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/7382144042
Status: cancelled

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/7384506520

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/7384506520
Status: cancelled

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/8354783697

@@ -0,0 +1,94 @@
/*
* Copyright (c) 2023, WSO2 LLC. (https://www.wso2.com) All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

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

License

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/8354783697
Status: cancelled

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/8371957298

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/8371957298
Status: cancelled

@CLAassistant
Copy link

CLAassistant commented Apr 2, 2024

CLA assistant check
All committers have signed the CLA.

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/8517037519

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/8517037519
Status: failure

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/8533096870

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/8533096870
Status: failure

@jenkins-is-staging
Copy link
Contributor

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/8534200921

@jenkins-is-staging
Copy link
Contributor

PR builder completed
Link: https://github.com/wso2/product-is/actions/runs/8534200921
Status: failure

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants