Skip to content

Commit

Permalink
MOSIP-34783 - Updated the apitest commons version for java21 (#366)
Browse files Browse the repository at this point in the history
* INJIMOB-1593 & INJIWEB-178 - Added test cases for create policy in sunbird registry and download sunbird VC

Signed-off-by: Mohanachandran S <[email protected]>

* INJIMOB-1593 & INJIWEB-178 - Added test cases for create policy in sunbird registry and download sunbird VC

Signed-off-by: Mohanachandran S <[email protected]>

* Update push-trigger.yml

Signed-off-by: Mohanachandran S <[email protected]>

* Update Dockerfile

Signed-off-by: Mohanachandran S <[email protected]>

---------

Signed-off-by: Mohanachandran S <[email protected]>
Signed-off-by: Mohanachandran S <[email protected]>
  • Loading branch information
mohanachandran-s committed Jul 29, 2024
1 parent 31d2e3c commit b2321ec
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/push-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,4 +230,4 @@ jobs:
# OSSRH_SECRET: ${{ secrets.OSSRH_SECRET }}
# OSSRH_TOKEN: ${{ secrets.OSSRH_TOKEN }}
# GPG_SECRET: ${{ secrets.GPG_SECRET }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_INJI_TEAM }}
34 changes: 16 additions & 18 deletions apitest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,37 +23,35 @@ ARG container_user_gid=1001

ARG KUBECTL_VERSION=1.22.9

# set working directory for the user
WORKDIR /home/${container_user}

ENV work_dir=/home/${container_user}

COPY ./apitest/target $work_dir/
COPY application.properties $work_dir/
COPY ["Biometric Devices", "$work_dir/Biometric Devices"]
COPY ["resource", "$work_dir/resource"]
COPY entrypoint.sh $work_dir
ADD ./apitest/target/ $work_dir

RUN apt-get -y update && \
apt-get install -y unzip jq && \
groupadd -g ${container_user_gid} ${container_user_group} && \
useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/sh -m ${container_user} && \
curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/ && \
chown -R ${container_user}:${container_user} /home/${container_user} /usr/local/openjdk-11/lib/security/cacerts && \
chmod 644 /usr/local/openjdk-11/lib/security/cacerts && \
chmod +x $work_dir/entrypoint.sh
ADD entrypoint.sh $work_dir/entrypoint.sh

# install packages and create user
RUN apt-get -y update \
&& apt-get install -y unzip jq curl \
&& groupadd -g ${container_user_gid} ${container_user_group} \
&& useradd -u ${container_user_uid} -g ${container_user_group} -s /bin/bash -m ${container_user} \
&& curl -LO "https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl" \
&& mkdir -p /home/${container_user} \
&& chmod +x kubectl $work_dir/entrypoint.sh \
&& mv kubectl /usr/local/bin/ \
&& chown -R ${container_user}:${container_user} /home/${container_user} /etc/ssl/certs/java/cacerts \
&& chmod 644 /etc/ssl/certs/java/cacerts

# select container user for all tasks
USER ${container_user_uid}:${container_user_gid}

WORKDIR ${work_dir}

EXPOSE 8083

ENV MODULES=
ENV ENV_USER=
ENV ENV_ENDPOINT=
ENV ENV_TESTLEVEL=smokeAndRegression

ENTRYPOINT ["./entrypoint.sh"]
ENTRYPOINT ["./entrypoint.sh"]
2 changes: 1 addition & 1 deletion apitest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
<dependency>
<groupId>io.mosip.testrig.apirig.apitest.commons</groupId>
<artifactId>apitest-commons</artifactId>
<version>1.2.1-SNAPSHOT</version>
<version>1.2.1-java21-SNAPSHOT</version>
</dependency>
</dependencies>

Expand Down
5 changes: 1 addition & 4 deletions apitest/testNgXmlFiles/mimotoApi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@
<class name="io.mosip.testrig.apirig.testscripts.SimplePost" />
</classes>
</test>


<test name="OAuthDetailsRequest">
<parameter name="ymlFile"
value="mimoto/OAuthDetailsRequest/OAuthDetailsRequest.yml" />
Expand All @@ -71,7 +69,6 @@
<class name="io.mosip.testrig.apirig.testscripts.SimplePostForAutoGenId" />
</classes>
</test>

<test name="OAuthDetailsRequestSunBirdC">
<parameter name="ymlFile"
value="mimoto/SunBirdC/OAuthDetailsRequestSunBirdC/OAuthDetailsRequestSunBirdC.yml" />
Expand Down Expand Up @@ -189,7 +186,7 @@
<class name="io.mosip.testrig.apirig.testscripts.PostWithFormDataBodyForPdfDownload" />
</classes>
</test>

<test name="DeletePolicySunBirdR">
<parameter name="ymlFile"
value="mimoto/SunBirdR/DeletePolicySunBirdR/DeletePolicySunBirdR.yml" />
Expand Down

0 comments on commit b2321ec

Please sign in to comment.