File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44
55from __future__ import unicode_literals
66import os .path
7+ import random
8+ import string
79import sys
810import tempfile
911
303305 'default' : {
304306 'ENGINE' : 'django.db.backends.' + os .environ .get ('DATABASE_ENGINE' , 'postgresql_psycopg2' ),
305307 'NAME' : os .environ .get ('DATABASE_NAME' , 'deis' ),
308+ # randomize test database name so we can run multiple unit tests simultaneously
309+ 'TEST_NAME' : "unittest-{}" .format ('' .join (
310+ random .choice (string .ascii_letters + string .digits ) for _ in range (8 )))
306311 }
307312}
308313
Original file line number Diff line number Diff line change 55#
66
77# fail on any command exiting non-zero
8- set -e
8+ set -eo pipefail
99
1010# absolute path to current directory
1111export THIS_DIR=$( cd $( dirname $0 ) ; pwd)
6868
6969make discovery-url
7070# add random characters after STACK_TAG to avoid collisions
71- # TODO: somehow this breaks "set -eo pipefail"
72- STACK_TAG=${STACK_TAG:- test} -$( base64 /dev/urandom | tr -dc a-z0-9 | head -c 6)
71+ STACK_TAG=${STACK_TAG:- test} -$( openssl rand -hex 4)
7372STACK_NAME=deis-$STACK_TAG
7473echo " Creating CloudFormation stack $STACK_NAME "
7574$DEIS_ROOT /contrib/ec2/provision-ec2-cluster.sh $STACK_NAME
You can’t perform that action at this time.
0 commit comments