Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Variety of fixes to enable testing

  • Loading branch information
Jim Van Fleet
Jim Van Fleet committed Sep 20, 2016
1 parent d5c28bf commit 7e811812dfc18ddbc4568d821167f3f4174a18b4
Showing with 27 additions and 7 deletions.
  1. +1 −1 Dockerfile
  2. +3 −0 bin/compose.sh
  3. +7 −3 bin/prune.sh
  4. +1 −3 docker-compose.yml
  5. +4 −0 tests/image.bats
  6. +11 −0 tests/running.bats
@@ -7,6 +7,6 @@ ARG version=1.0.5
LABEL Version=$version
ENV VERSION=$version

ADD ./container_files /opt/
#ADD ./container_files /opt/
RUN ln -s /opt/etc/httpd/conf.d/virtual_host_443.conf /etc/httpd/conf.d/00-comanage-443.conf
VOLUME /etc/httpd/logs
@@ -1,4 +1,7 @@
#!/bin/bash

echo "Composing"
docker rm mariadb
docker rm comanage_mariadb
docker rm comanage
docker-compose up -d
@@ -1,7 +1,11 @@
#!/bin/bash

result=$(docker volume ls -qf dangling=true)
volume="comanageappliance_comanage_mysql"
result=$(docker volume inspect $volume)
laststatus="$?"

if [ ! -z "$result" ]; then
docker volume rm $result
if [ "$laststatus" == "0" ]; then
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker volume rm $volume
fi
@@ -2,7 +2,7 @@ version: '2'

services:
mariadb:
image: bigfleet/mariadb
image: tier/mariadb
container_name: comanage_mariadb
hostname: mariadb
ports:
@@ -15,7 +15,6 @@ services:
- i2network
volumes:
- comanage_mysql:/var/lib/mysqlmounted
restart: always
env_file:
- conf/common.env
- conf/db.env
@@ -38,7 +37,6 @@ services:
env_file:
- conf/common.env
- conf/comanage.env
restart: always

networks:
i2network:
@@ -10,4 +10,8 @@ load ../common
@test "Contains php" {
run docker run -i $maintainer/$imagename which php
[ "$status" -eq 0 ]
}

@test "Has fired autorun onbuild" {
docker run -i $maintainer/$imagename find /opt/log/autoexec.build.log
}
@@ -0,0 +1,11 @@
#!/usr/bin/env bats

load ../common

@test "Has fired autorun firstrun" {
docker-compose run comanage find /opt/log/autoexec.firstrun.log
}

@test "Creates user account with password" {
docker-compose run comanage mysql -u registry_user --password="WJzesbe3poNZ91qIbmR7" -h mariadb -e 'show tables' registry
}

0 comments on commit 7e81181

Please sign in to comment.
You can’t perform that action at this time.