add installation of adduser for integration tests
This commit is contained in:
parent
b8b7091ec2
commit
e2b7732a5e
5 changed files with 7 additions and 5 deletions
|
@ -1,6 +1,6 @@
|
|||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="test_incl_containtertests" type="JUnit" factoryName="JUnit">
|
||||
<module name="provs.test" />
|
||||
<module name="org.domaindrivenarchitecture.provs.provs.test" />
|
||||
<option name="PACKAGE_NAME" value="org" />
|
||||
<option name="MAIN_CLASS_NAME" value="" />
|
||||
<option name="METHOD_NAME" value="" />
|
||||
|
|
|
@ -2,7 +2,7 @@ FROM ubuntu:latest
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install apt-utils sudo
|
||||
RUN apt-get update && apt-get -y install apt-utils adduser sudo
|
||||
|
||||
RUN useradd -m testuser && echo "testuser:testuserpw" | chpasswd && adduser testuser sudo
|
||||
RUN echo "testuser ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/testuser
|
||||
|
|
|
@ -21,7 +21,7 @@ FROM ubuntu:20.04
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install sudo
|
||||
RUN apt-get update && apt-get -y install adduser sudo
|
||||
RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && adduser $userName sudo
|
||||
RUN echo "$userName ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/$userName
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ FROM ubuntu:18.04
|
|||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && apt-get -y install sudo
|
||||
RUN apt-get update && apt-get -y install adduser sudo
|
||||
RUN useradd -m $userName && echo "$userName:$userName" | chpasswd && adduser $userName sudo
|
||||
|
||||
USER $userName
|
||||
|
|
|
@ -16,7 +16,9 @@ const val defaultTestContainerName = "provs_test"
|
|||
private lateinit var prov: Prov
|
||||
|
||||
fun defaultTestContainer(startMode: ContainerStartMode = ContainerStartMode.USE_RUNNING_ELSE_CREATE): Prov {
|
||||
if (!::prov.isInitialized || !testLocal().containerRuns(defaultTestContainerName) || (startMode == ContainerStartMode.CREATE_NEW_KILL_EXISTING)) { prov = initDefaultTestContainer(startMode) }
|
||||
if (!::prov.isInitialized || !testLocal().containerRuns(defaultTestContainerName) || (startMode == ContainerStartMode.CREATE_NEW_KILL_EXISTING)) {
|
||||
prov = initDefaultTestContainer(startMode)
|
||||
}
|
||||
return prov
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue