Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
[flake8]
extend-ignore = E501, W504, W503, E126
exclude = lib*, bin
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
/test
cert*
.*.sw*
/docs
/repos
bin/
lib*/
pyvenv.cfg
CACHEDIR.TAG
3 changes: 3 additions & 0 deletions .pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[pytest]
testpaths =
test
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,17 @@ Section 3: Testing and basic functionality

- In order to verify that singularity is behaving correctly, you should run the test suite.

- You will need to install some host packages needed by the testing script: flake8, shellcheck, jq, and curl.
On Fedora these packages can be obtained by running `sudo dnf install -y python3-flake8 shellcheck jq curl`.
- You will need to install some host packages needed by the tests: shellcheck and jq

- Now you can run `./test.sh`. If you followed the directions, the tests should pass.
On Fedora these packages can be obtained by running `sudo dnf install -y ShellCheck jq`

- Note that recent versions of Fedora ship with `curl-minimal` rather than `curl`, and that the former does not support pop3s.
If, when running the tests, you encounter an error like `"pop3s: protocol not supported"` you can first try `dnf swap libcurl-minimal libcurl`--
failing that, you may need to run `dnf download libcurl.$(uname -m) && sudo dnf install --allowerasing ./libcurl*.rpm && rm libcurl*.rpm`.
- You will need to install some python packages needed by the tests

- Use a python virtual environment to obtain the correct versions: `virtualenv . && pip install -r requirements.txt`, assuming you have both `virtualenv` and `pip` installed

On Fedora the packages needed to run those last two commands can be obtained by running `sudo dnf install -y python-virtualenv python-pip`

- Now you can run `pytest`. If you followed the directions, the tests should pass.

- You will not be able to access the services using a normal web browser or email client without one more step as the
services listening on unix sockets instead of TCP ports.
Expand Down
23 changes: 14 additions & 9 deletions extenginx/Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,35 @@ RUN apk update && apk upgrade && apk add \
openssl \
;


ARG NGINX_HOSTNAME=localhost

RUN mkdir /etc/ssl/nginx && \
cd /etc/ssl/nginx && \
openssl \
genpkey \
-genparam \
-algorithm DH \
-pkeyopt dh_paramgen_prime_len:2048 \
-out ssl-dhparams.pem \
-out ssl-dhparams.pem && \
printf "[req]\n \
distinguished_name=req\n \
[ v3_ext ]\n \
subjectAltName=DNS:${NGINX_HOSTNAME},IP:127.0.0.1\n" > openssl.cnf \
&& \
:

ARG NGINX_HOSTNAME=localhost

RUN cd /etc/ssl/nginx && \
openssl \
req \
-sha256 \
-newkey rsa:4096 \
openssl req \
-x509 \
-nodes \
-days 133337 \
-subj "/CN=${NGINX_HOSTNAME}" \
-noenc \
-newkey rsa:2048 \
-keyout privkey.pem \
-out fullchain.pem \
-subj "/CN=${NGINX_HOSTNAME}" \
-extensions v3_ext \
-config openssl.cnf \
&& \
:

Expand Down
4 changes: 2 additions & 2 deletions git/admin.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
set -e

DOCKER_COMPOSE=${DOCKER_COMPOSE:-podman-compose}
PODMAN_COMPOSE=${PODMAN_COMPOSE:-podman-compose}

$DOCKER_COMPOSE exec git ./create-repo.sh "$@"
$PODMAN_COMPOSE exec git ./create-repo.sh "$@"
4 changes: 2 additions & 2 deletions orbit/warpdrive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

set -e

DOCKER_COMPOSE=${DOCKER_COMPOSE:-podman-compose}
PODMAN_COMPOSE=${PODMAN_COMPOSE:-podman-compose}

$DOCKER_COMPOSE exec orbit ./hyperspace.py "$@"
$PODMAN_COMPOSE exec orbit ./hyperspace.py "$@"
14 changes: 14 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
certifi==2025.1.31
charset-normalizer==3.4.1
flake8==7.1.2
idna==3.10
iniconfig==2.0.0
mccabe==0.7.0
packaging==24.2
pluggy==1.5.0
pycodestyle==2.12.1
pyflakes==3.2.0
pytest==8.3.4
requests==2.31.0
requests-unixsocket==0.3.0
urllib3==2.3.0
1 change: 0 additions & 1 deletion script-lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ require shellcheck
set -ex

shellcheck script-lint.sh
shellcheck test.sh
shellcheck orbit/warpdrive.sh
shellcheck denis/configure.sh
shellcheck mailman/inspector.sh
Expand Down
217 changes: 0 additions & 217 deletions test.sh

This file was deleted.

Loading