mirror of
https://github.com/mykitserver/docker-limesurvey.git
synced 2025-12-06 16:39:11 +01:00
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
.\#*
|
.\#*
|
||||||
|
|
||||||
.venv/
|
.venv/
|
||||||
|
container-structure-test
|
||||||
@@ -2,9 +2,10 @@ sudo: required
|
|||||||
language: bash
|
language: bash
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- env: TEST=limesurvey-apache
|
- env: TAG=martialblog/limesurvey-apache
|
||||||
script: docker build -t martialblog/limesurvey-apache -f apache/Dockerfile .
|
script: docker build -q -t $TAG -f apache/Dockerfile . && tests/run.sh $TAG
|
||||||
- env: TEST=limesurvey-fpm
|
- env: TAG=martialblog/limesurvey-fpm
|
||||||
script: docker build -t martialblog/limesurvey-fpm -f fpm/Dockerfile .
|
script: docker build -q -t $TAG -f fpm/Dockerfile . && tests/run.sh $TAG
|
||||||
|
|||||||
77
tests/image_tests.yaml
Normal file
77
tests/image_tests.yaml
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
schemaVersion: "2.0.0"
|
||||||
|
|
||||||
|
globalEnvVars:
|
||||||
|
- key: "PATH"
|
||||||
|
value: "/env/bin:$PATH"
|
||||||
|
|
||||||
|
fileContentTests:
|
||||||
|
- name: 'Limesurvey admin file content'
|
||||||
|
path: '/var/www/html/admin/index.php'
|
||||||
|
expectedContents: ['LimeSurvey']
|
||||||
|
|
||||||
|
fileExistenceTests:
|
||||||
|
- name: 'Limesurvey files'
|
||||||
|
path: '/var/www/html/index.php'
|
||||||
|
shouldExist: true
|
||||||
|
permissions: '-rw-rw-r--'
|
||||||
|
- name: 'Limesurvey admin files'
|
||||||
|
path: '/var/www/html/admin/index.php'
|
||||||
|
shouldExist: true
|
||||||
|
permissions: '-rw-rw-r--'
|
||||||
|
- name: 'Ldap syslink'
|
||||||
|
path: '/usr/lib/x86_64-linux-gnu/libldap.so'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - gd"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-gd.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - imap"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-imap.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - ldap"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - pgsql"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-pgsql.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - zip"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-zip.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - sodium"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - pdo_mysql"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini'
|
||||||
|
shouldExist: true
|
||||||
|
- name: "Dependencies - PHP - pdo_pgsql"
|
||||||
|
path: '/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini'
|
||||||
|
shouldExist: true
|
||||||
|
|
||||||
|
commandTests:
|
||||||
|
- name: "Dependencies - libldap2-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "libldap2-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - zlib1g-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "zlib1g-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - libc-client-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "libc-client-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - libkrb5-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "libkrb5-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - libpng-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "libpng-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - libpq-dev"
|
||||||
|
command: "dpkg"
|
||||||
|
args: ["-l", "libpq-dev"]
|
||||||
|
exitCode: 0
|
||||||
|
- name: "Dependencies - PHP Modules"
|
||||||
|
command: "php"
|
||||||
|
args: ["-m"]
|
||||||
|
expectedOutput: ["ldap", "zip", "pdo_mysql", "pdo_sqlite", "gd", "mbstring", "PDO", "imap"]
|
||||||
10
tests/run.sh
Executable file
10
tests/run.sh
Executable file
@@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
IMAGE=$1
|
||||||
|
|
||||||
|
if [ ! -f container-structure-test ]; then
|
||||||
|
curl -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test
|
||||||
|
chmod +x container-structure-test
|
||||||
|
fi
|
||||||
|
|
||||||
|
./container-structure-test test --image $IMAGE --config tests/image_tests.yaml
|
||||||
Reference in New Issue
Block a user