Add end-to-end Test
- Add an infrastructur to run local e2e tests. - Add some tests.
This commit is contained in:
@@ -57,27 +57,6 @@ RUN apt-get update -yqq && \
|
||||
openssl \
|
||||
sq
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" user && \
|
||||
mkdir -p /home/user/ && \
|
||||
usermod -a -G sudo user && \
|
||||
chown -R user:user /home/user
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" alice && \
|
||||
mkdir -p /home/alice/ && \
|
||||
chown -R alice:alice /home/alice
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" bob && \
|
||||
mkdir -p /home/bob/ && \
|
||||
chown -R bob:bob /home/bob
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" carol && \
|
||||
mkdir -p /home/carol/ && \
|
||||
chown -R carol:carol /home/carol
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" dave && \
|
||||
mkdir -p /home/dave/ && \
|
||||
chown -R dave:dave /home/dave
|
||||
|
||||
RUN adduser --shell /bin/bash --disabled-password --gecos "" hockeypuck
|
||||
|
||||
COPY mta_provision/ /
|
||||
|
||||
@@ -26,6 +26,6 @@ The mapped binary will be started, alongside `postfix` and `hockeypuck`.
|
||||
|
||||
```
|
||||
$ docker run -ti --rm \
|
||||
--mount type=bind,src=$(pwd)/target/release,dst=/opt/husk/mapped/
|
||||
--mount type=bind,src=$(pwd),dst=/opt/husk/mapped/
|
||||
localhost/mta bash -c "/usr/bin/prepare.sh && bash -i"
|
||||
```
|
||||
@@ -7,8 +7,8 @@ echo "127.0.0.1 " $(hostname) > /etc/hosts
|
||||
echo "127.0.0.2 example.com" >> /etc/hosts
|
||||
|
||||
## build milter
|
||||
if [ -f /opt/husk/mapped/husk ] ; then
|
||||
HUSK_BIN=/opt/husk/mapped/husk
|
||||
if [ -f /opt/husk/mapped/Cargo.toml ] ; then
|
||||
HUSK_BIN=/opt/husk/mapped/target/release/husk
|
||||
else
|
||||
cd /opt/husk
|
||||
git clone https://gitlab.com/husk-project/husk-milter.git
|
||||
|
||||
Reference in New Issue
Block a user