Skip to content
Snippets Groups Projects
Commit 827b447c authored by ale's avatar ale
Browse files

Load data from test blogs

parent 65e42a69
No related branches found
No related tags found
1 merge request!469Run ci-test with actual data
Pipeline #85338 passed
include: "https://git.autistici.org/pipelines/containers/raw/master/common.yml"
# test the newly built container before releasing it.
# Test the newly built container before releasing it.
#
# Use "float-podman-runner" to set up a rootless container like 'float' does.
# Use "ai3/testdata" to populate a MySQL database that looks like the real
# noblogs.org, and finally run some HTTP tests (in docker/test.sh).
# NOTE: The database configuration (docker/test-config.json) does not match
# production as there is no sharding, instead everything is stored in the
# main 'noblogs' database.
test:
stage: container-test
image: registry.git.autistici.org/pipelines/images/test/float-podman-runner:master
......@@ -12,7 +19,8 @@ test:
tags: [podman]
variables:
APACHE_PORT: 8080
SITE_URL: "http://localhost:8080"
TARGET_URL: "http://localhost:8080"
TARGET_ADDR: "127.0.0.1:8080"
MYSQL_DATABASE: noblogs
MYSQL_ROOT_PASSWORD: rootpass
before_script:
......@@ -21,5 +29,6 @@ test:
- dnf install -y mysql xz git
- git clone --depth=1 https://gitlab-ci-token:${CI_JOB_TOKEN}@git.autistici.org/ai3/testdata.git /tmp/testdata.$CI_JOB_ID
- xzcat /tmp/testdata.$CI_JOB_ID/noblogs/noblogs.sql.xz | mysql --user=root --password=rootpass --host=mysql noblogs
- for blog in cavallette detriti docs ; do xzcat /tmp/testdata.$CI_JOB_ID/noblogs/noblogs_${blog}.sql.xz | mysql --user=root --password=rootpass --host=mysql noblogs; done
- with-container --expose=8080 --mount=type=bind,source=docker/test-config.json,destination=/etc/noblogs/config.json --mount=type=tmpfs,destination=/opt/noblogs/www/wp-content/blogs.dir --mount=type=tmpfs,destination=/opt/noblogs/www/wp-content/cache $IMAGE_TAG ./docker/test.sh
#!/bin/sh
exec curl -H 'Host: noblogs.org' -v -s ${SITE_URL}/
exec curl -H 'X-Forwarded-Proto: https' -H 'Host: noblogs.org' -v -s ${TARGET_URL}/
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment