Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Moved testkit python setup from testkit to here
- Loading branch information
Showing
8 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,3 +28,4 @@ integrationtests/data | |
dependency-reduced-pom.xml | ||
venv | ||
testkit-backend/bin/ | ||
testkit/CAs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.py | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Install Maven 3.6, Java 11, Java 8 and Python3 | ||
FROM maven:3.6.3-openjdk-8 | ||
|
||
RUN apt-get --quiet --quiet update \ | ||
&& apt-get --quiet --quiet install -y bash python3 \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PYTHON=python3 | ||
ENV JAVA_HOME=/usr/local/openjdk-8 | ||
ENV PATH=$JAVA_HOME/bin:$PATH | ||
|
||
# Install our own CAs on the image. | ||
# Assumes Linux Debian based image. | ||
# JAVA_HOME needed by update-ca-certificates hook to update Java with changed system CAs. | ||
COPY CAs/* /usr/local/share/ca-certificates/ | ||
RUN update-ca-certificates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
Executed in Java driver container. | ||
Assumes driver and backend has been built. | ||
Responsible for starting the test backend. | ||
""" | ||
import os, subprocess | ||
|
||
|
||
if __name__ == "__main__": | ||
err = open("/artifacts/backenderr.log", "w") | ||
out = open("/artifacts/backendout.log", "w") | ||
subprocess.check_call( | ||
["java", "-jar", "testkit-backend/target/testkit-backend.jar"], stdout=out, stderr=err) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
""" | ||
Executed in java driver container. | ||
Responsible for building driver and test backend. | ||
""" | ||
import os, subprocess | ||
|
||
def run(args): | ||
subprocess.run( | ||
args, universal_newlines=True, stderr=subprocess.STDOUT, check=True) | ||
|
||
if __name__ == "__main__": | ||
run(["mvn", "clean", "install", "-P", "!determine-revision", "-DskipTests"]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
if __name__ == "__main__": | ||
print("Integration tests not ported to testkit") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
if __name__ == "__main__": | ||
print("Stress tests not ported to testkit") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
""" | ||
Executed in Java driver container. | ||
Responsible for running unit tests. | ||
Assumes driver has been setup by build script prior to this. | ||
""" | ||
|
||
import os, subprocess | ||
|
||
def run(args): | ||
subprocess.run( | ||
args, universal_newlines=True, stderr=subprocess.STDOUT, check=True) | ||
|
||
if __name__ == "__main__": | ||
run(["mvn", "test", "-Dmaven.gitcommitid.skip"]) |