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

MOSIP-39007 - Configured esignet with sunbird plugin #1119

Merged
merged 18 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions api-test/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<name>apitest-esignet</name>
<description>Parent project of MOSIP Esignet apitests</description>
<url>https://github.com/mosip/esignet</url>
<version>1.5.1-SNAPSHOT</version>
<version>1.5.1-develop-SNAPSHOT</version>

<licenses>
<license>
Expand Down Expand Up @@ -49,7 +49,7 @@
<maven.source.plugin.version>2.2.1</maven.source.plugin.version>

<git.commit.id.plugin.version>3.0.1</git.commit.id.plugin.version>
<fileName>apitest-esignet-1.5.1-SNAPSHOT-jar-with-dependencies</fileName>
<fileName>apitest-esignet-1.5.1-develop-SNAPSHOT-jar-with-dependencies</fileName>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public static void main(String[] arg) {


if (EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("mockauthenticationservice") == false
&& EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("sunbird") == false) {
&& EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("sunbirdrcauthenticationservice") == false) {
KeycloakUserManager.removeUser();
KeycloakUserManager.createUsers();
KeycloakUserManager.closeKeycloakInstance();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,9 @@ public void setResultTestName(ITestResult result) {
public void waittime() {
try {
if (EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase()
.contains("mockauthenticationservice") == false) {
.contains("mockauthenticationservice") == false
&& EsignetUtil.getIdentityPluginNameFromEsignetActuator().toLowerCase()
.contains("sunbirdrcauthenticationservice") == false) {
if (!testCaseName.contains(GlobalConstants.ESIGNET_)) {
long delayTime = Long.parseLong(properties.getProperty("Delaytime"));
logger.info("waiting for " + delayTime + " mili secs after VID Generation In RESIDENT SERVICES");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
&& !EsignetConfigManager.getEsignetMockBaseURL().isBlank())
tempUrl = ApplnURI.replace("api-internal.", EsignetConfigManager.getEsignetMockBaseURL());
testCaseDTO.setEndPoint(testCaseDTO.getEndPoint().replace("$ESIGNETMOCKBASEURL$", ""));
response = postWithBodyAndCookie(tempUrl + testCaseDTO.getEndPoint(), inputJson, auditLogCheck,
COOKIENAME, testCaseDTO.getRole(), testCaseDTO.getTestCaseName(), sendEsignetToken);
} else if (testCaseDTO.getEndPoint().startsWith("$SUNBIRDBASEURL$")
&& testCaseName.contains("SunBirdR")) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,15 @@ public static String isTestCaseValidForExecution(TestCaseDTO testCaseDTO) {
throw new SkipException(GlobalConstants.FEATURE_NOT_SUPPORTED_MESSAGE);
}

} else if (getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("sunbird")) {
} else if (getIdentityPluginNameFromEsignetActuator().toLowerCase().contains("sunbirdrcauthenticationservice")) {
// Let run test cases eSignet & Sunbird (for identity) -- only KBI

String endpoint = testCaseDTO.getEndPoint();

if (testCaseName.contains("SunBird") == false) {
throw new SkipException(GlobalConstants.FEATURE_NOT_SUPPORTED_MESSAGE);
}

}

if (testCaseDTO.isValidityCheckRequired()) {
Expand Down
4 changes: 2 additions & 2 deletions api-test/src/main/resources/config/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ passwordToReset=12341234_AaB
XSRFTOKEN=7d01b2a8-b89d-41ad-9361-d7f6294021d1
codeChallenge=E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM
codeVerifier=dBjftJeZ4CVP-mB92K27uhbUJU1p1r_wW1gFWFOEjXk
policyNumberForSunBirdRC=326253801
policyNumberForSunBirdRC=326258952
challengeValueForSunBirdRC=eyJmdWxsTmFtZSI6IlJvaGFuIEt1bWFyIiwiZG9iIjoiMTk5OS0xMC0xMiJ9
fullNameForSunBirdRC=Rohan Kumar
fullNameForSunBirdRC=David Jones
dobForSunBirdRC=1999-10-12
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ GetPolicySunBirdR:
"insuranceid": "$ID:SunBirdR_CreatePolicy_NOAUTH_Valid_Smoke_Sid_osid$"
}'
output: '{
"policyNumber": "326253801"
"policyNumber": "$IGNORE$"
}'
Loading