Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/Infosys/esignet into dev…
Browse files Browse the repository at this point in the history
…elop
  • Loading branch information
pvsaidurga committed Jun 19, 2024
2 parents ac484c7 + e1c93db commit c030a79
Show file tree
Hide file tree
Showing 58 changed files with 1,068 additions and 652 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/chart-lint-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- 'charts/**'
- 'helm/**'
workflow_dispatch:
inputs:
IGNORE_CHARTS:
Expand Down
54 changes: 51 additions & 3 deletions .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,21 +130,69 @@ jobs:
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}

build-dockers_apitest_esignet:
build-apitest-esignet-local:
needs: build-maven-apitest-esignet
runs-on: ubuntu-latest
env:
NAMESPACE: ${{ secrets.dev_namespace_docker_hub }}
SERVICE_NAME: apitest-esignet
SERVICE_LOCATION: apitest
BUILD_ARTIFACT: apitest-esignet-local
steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
ref: ${{ github.ref }}
java-version: 11
server-id: ossrh # Value of the distributionManagement/repository/id field of the pom.xml
settings-path: ${{ github.workspace }} # location for the settings.xml file
- name: Setup the settings file for ossrh server
run: echo "<settings> <servers> <server> <id>ossrh</id> <username>${{secrets.ossrh_user}}</username> <password>${{secrets.ossrh_secret}}</password> </server> </servers> <profiles> <profile> <id>ossrh</id> <activation> <activeByDefault>true</activeByDefault> </activation> <properties> <gpg.executable>gpg2</gpg.executable> <gpg.passphrase>${{secrets.gpg_secret}}</gpg.passphrase> </properties> </profile> <profile> <id>allow-snapshots</id> <activation><activeByDefault>true</activeByDefault></activation> <repositories> <repository> <id>snapshots-repo</id> <url>https://oss.sonatype.org/content/repositories/snapshots</url> <releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> <repository> <id>releases-repo</id> <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>false</enabled></snapshots> </repository> </repositories> </profile> <profile> <id>sonar</id> <properties> <sonar.sources>.</sonar.sources> <sonar.host.url>https://sonarcloud.io</sonar.host.url> </properties> <activation> <activeByDefault>false</activeByDefault> </activation> </profile> </profiles> </settings>" > $GITHUB_WORKSPACE/settings.xml
- name: Build Automationtests with Maven
run: |
cd ${{ env.SERVICE_LOCATION}}
mvn clean package -s $GITHUB_WORKSPACE/settings.xml
- name: Copy configuration files to target directory.
run: |
cp -r ${{ env.SERVICE_LOCATION}}/target/classes/config ${{ env.SERVICE_LOCATION}}/target/config
cp -r ${{ env.SERVICE_LOCATION}}/testNgXmlFiles ${{ env.SERVICE_LOCATION}}/target/testNgXmlFiles
- name: Ready the springboot artifacts
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
run: |
## FIND JARS & COPY ONLY EXECUTABLE JARs STORED UNDER TARGET DIRECTORY
find ${{ env.SERVICE_LOCATION }} -path '*/target/*' -exec zip ${{ env.BUILD_ARTIFACT }}.zip {} +
- name: Upload the springboot jars
if: ${{ !contains(github.ref, 'master') || !contains(github.ref, 'main') }}
uses: actions/upload-artifact@v3
with:
name: ${{ env.BUILD_ARTIFACT }}
path: ${{ env.BUILD_ARTIFACT }}.zip
- uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,author,commit,workflow,job # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required
if: failure() # Pick up events even if the job fails or is canceled.

build-dockers_apitest_esignet:
needs: build-apitest-esignet-local
strategy:
matrix:
include:
- SERVICE_LOCATION: 'apitest'
SERVICE_NAME: 'apitest-esignet'
BUILD_ARTIFACT: 'apitest-esignet'
BUILD_ARTIFACT: 'apitest-esignet-local'
ONLY_DOCKER: true
fail-fast: false
name: ${{ matrix.SERVICE_NAME }}
uses: mosip/kattu/.github/workflows/docker-build.yml@master
with:
SERVICE_LOCATION: ${{ matrix.SERVICE_LOCATION }}
SERVICE_NAME: ${{ matrix.SERVICE_NAME }}
BUILD_ARTIFACT: ${{ matrix.BUILD_ARTIFACT }}
ONLY_DOCKER: ${{ matrix.ONLY_DOCKER }}
secrets:
DEV_NAMESPACE_DOCKER_HUB: ${{ secrets.DEV_NAMESPACE_DOCKER_HUB }}
ACTOR_DOCKER_HUB: ${{ secrets.ACTOR_DOCKER_HUB }}
Expand All @@ -164,4 +212,4 @@ jobs:
OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
GPG_SECRET: ${{ secrets.GPG_SECRET }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
2 changes: 1 addition & 1 deletion apitest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WORKDIR /home/${container_user}

ENV work_dir=/home/${container_user}

ADD ./target/ $work_dir
ADD ./apitest/target/ $work_dir

ADD entrypoint.sh $work_dir/entrypoint.sh

Expand Down
6 changes: 3 additions & 3 deletions apitest/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 apitest-esignet</description>
<url>https://github.com/mosip/esignet</url>
<version>1.2.0.1-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>

<licenses>
<license>
Expand Down Expand Up @@ -386,9 +386,9 @@
<dependencies>

<dependency>
<groupId>io.mosip.testrig.apirig.automationtests.commons</groupId>
<groupId>io.mosip.testrig.apirig.apitest.commons</groupId>
<artifactId>apitest-commons</artifactId>
<version>1.2.0.1-SNAPSHOT</version>
<version>1.2.1-SNAPSHOT</version>
</dependency>

</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,20 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
request.remove(GlobalConstants.IDENTITYREQUEST);
}
identityRequest = buildIdentityRequest(identityRequest);
identityRequest = inputJsonKeyWordHandeler(identityRequest, testCaseName);

JSONObject identityReqJson = new JSONObject(identityRequest);
identityRequestTemplate = identityReqJson.getString("identityRequestTemplate");
identityReqJson.remove("identityRequestTemplate");
identityRequestEncUrl = identityReqJson.getString("identityRequestEncUrl");
identityReqJson.remove("identityRequestEncUrl");

if (identityReqJson.has("transactionId")) {
String oidcTransactionId = AdminTestUtil.getAuthTransactionId(identityReqJson.getString("transactionId"));
if (oidcTransactionId != null && !oidcTransactionId.isBlank())
identityReqJson.put("transactionId", oidcTransactionId);
}

identityRequest = getJsonFromTemplate(identityReqJson.toString(), identityRequestTemplate);
if (identityRequest.contains("$DOMAINURI$")) {
String domainUrl = ApplnURI.replace("api-internal", GlobalConstants.ESIGNET);
Expand Down Expand Up @@ -187,7 +195,7 @@ public void test(TestCaseDTO testCaseDTO) throws AuthenticationTestException, Ad
} catch (SkipException e) {
throw new SkipException(e.getMessage());
} catch (Exception e) {
logger.error(e.getMessage());
throw new AdminTestException(e.getMessage());
}

}
Expand Down
54 changes: 54 additions & 0 deletions apitest/src/main/resources/esignet/AddIdentity/AddIdentity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,33 @@ AddIdentity:
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_User2_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: esignet/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: esignet/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1992/04/15",
"postalCode": "14022",
"email": "ESignet_AddIdentity_Linked_Consent_User2_smoke_Pos@mosip.net",
"phone": "9876543210",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_Vid_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
Expand Down Expand Up @@ -296,6 +323,33 @@ AddIdentity:
"status":"ACTIVATED"
}'

ESignet_AddIdentity_Linked_Consent_User2_Vid_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
restMethod: post
inputTemplate: esignet/AddIdentity/addIdentity_$LANGNUMBER$
outputTemplate: esignet/AddIdentity/addIdentityResult
input: '{
"value": "$BIOVALUE$",
"id": "mosip.id.create",
"registrationId": "$RID$",
"biometricReferenceId": "23452353",
"UIN": "$UIN$",
"dateOfBirth": "1992/04/15",
"postalCode": "14022",
"email": "ESignet_AddIdentity_Linked_Consent_User2_Vid_smoke_Pos@mosip.net",
"phone": "9876543210",
"referenceIdentityNumber": "6789545678878",
"version": "v1",
"introducerRID": "212124324784879",
"introducerUIN": "212124324784879",
"category": "individualBiometrics",
"requesttime": "$TIMESTAMP$"
}'
output: '{
"status":"ACTIVATED"
}'

ESignet_AddIdentity_BioAuth_smoke_Pos:
endPoint: /idrepository/v1/identity/
role: idrepo
Expand Down
Loading

0 comments on commit c030a79

Please sign in to comment.