Commit 4eb328c9eac68b110353934a1b7b01f7c9d5a53e

Authored by Loic Dachary
2 parents 9f6e2b27 8e93f793

Merge branch 'wip-tests' into 'master'

fix integration tests

they were broken because gitlab was not pinned

See merge request !52
... ... @@ -57,7 +57,8 @@ class WBBackportSetRelease(object):
57 57 parser.add_argument('--releases',
58 58 action=util.CommaSplit,
59 59 default=['firefly', 'hammer',
60   - 'infernalis', 'jewel'],
  60 + 'infernalis', 'jewel',
  61 + 'kraken'],
61 62 help=('Comma separated list of releases'))
62 63 parser.add_argument('--git-remote',
63 64 default='origin',
... ...
... ... @@ -41,7 +41,8 @@ class WBRepo(object):
41 41 'giant': 'v0.87',
42 42 'hammer': 'v0.94',
43 43 'infernalis': 'v9.2.0',
44   - 'jewel': 'v10.2.0'}
  44 + 'jewel': 'v10.2.0',
  45 + 'kraken': 'v11.2.0'}
45 46
46 47 def __init__(self, args):
47 48 self.args = args
... ...
1   -FROM ubuntu:14.04
  1 +FROM ubuntu:16.04
2 2 MAINTAINER Loic Dachary "loic@dachary.org"
3 3
4 4 # nova.clouds will redirect to the fastest mirror
5 5 RUN sed -i -e 's|http://archive.ubuntu|http://nova.clouds.archive.ubuntu|' /etc/apt/sources.list
6 6 RUN apt-get update
7   -RUN apt-get install -y python-virtualenv git
  7 +RUN apt-get install -y python-virtualenv git sudo
8 8 RUN echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
9 9 RUN apt-get install -y wget # for when ceph-qa-suite gets an new image
10 10 RUN cd /opt ; git clone --recursive http://ceph-workbench.dachary.org/root/ceph-workbench.git
... ...
  1 +# careful to sync these with teuthology/requirements.txt so they do not conflict
1 2 alabaster==0.7.7
2 3 ansible==2.1.1.0
3 4 appdirs==1.4.0
... ...
... ... @@ -2,12 +2,14 @@ set -ex
2 2 DATA=$(pwd)/data
3 3 mkdir -p $DATA
4 4 sudo docker run --name=test-redis -d sameersbn/redis:latest
5   -sudo rm -fr $DATA/mysql
6   -mkdir -p $DATA/mysql
7   -sudo docker run --name=test-mysql -d -e 'DB_NAME=gitlabhq_production' -e 'DB_USER=gitlab' -e 'DB_PASS=Wrobyak4' -v $DATA/mysql/data:/var/lib/mysql sameersbn/mysql:latest
  5 +sudo rm -fr $DATA/gitlab-postgresql
  6 +mkdir -p $DATA/gitlab-postgresql
  7 +sudo docker run --name gitlab-postgresql -d --env 'DB_NAME=gitlabhq_production' --env 'DB_USER=gitlab' --env "DB_PASS=Wrobyak4" --env 'DB_EXTENSION=pg_trgm' --volume $DATA/gitlab-postgresql:/var/lib/postgresql sameersbn/postgresql:9.5-3
8 8 sudo rm -fr $DATA/gitlab
9 9 mkdir -p $DATA/gitlab
10   -sudo docker run --name='test-gitlab' -it -d --link test-mysql:mysql --link test-redis:redisio -e 'GITLAB_SIGNUP=true' -e 'GITLAB_PORT=80' -e 'GITLAB_HOST=localhost' -e 'GITLAB_SSH_PORT=8022' -p 8022:22 -p 8181:80 -e GITLAB_SECRETS_DB_KEY_BASE=4W44tm7bJFRPWNMVzKngffxVWXRpVs49dxhFwgpx7FbCj3wXCMmsz47LzWsdr7nM -v /var/run/docker.sock:/run/docker.sock -v $DATA/gitlab/data:/home/git/data -v $(which docker):/bin/docker sameersbn/gitlab
  10 +key=4W44tm7bJFRPWNMVzKngffxVWXRpVs49dxhFwgpx7FbCj3wXCMmsz47LzWsdr7nM
  11 +# do *NOT* set GITLAB_ROOT_PASSWORD=admin because it will silently fail (sanity check probably, because it's too simple or reserved)
  12 +sudo docker run --name='test-gitlab' -it -d --link gitlab-postgresql:postgresql --link test-redis:redisio -e DEBUG=true -e 'GITLAB_SIGNUP=true' -e 'GITLAB_PORT=80' -e 'GITLAB_HOST=localhost' -e 'GITLAB_SSH_PORT=8022' -p 8022:22 -p 8181:80 -e GITLAB_SECRETS_SECRET_KEY_BASE=$key -e GITLAB_SECRETS_DB_KEY_BASE=$key -e GITLAB_SECRETS_OTP_KEY_BASE=$key -e GITLAB_ROOT_PASSWORD='5iveL!fe' -v /var/run/docker.sock:/run/docker.sock -v $DATA/gitlab/data:/home/git/data -v $(which docker):/bin/docker sameersbn/gitlab:8.16.3
11 13 success=false
12 14 for delay in 15 15 15 15 15 30 30 30 30 30 30 30 30 60 60 60 60 120 240 512 ; do
13 15 sleep $delay
... ...
1 1 set -xe
2   -sudo docker run --name=postgresql-redmine -d --env='DB_NAME=redmine_production' --env='DB_USER=redmine' --env='DB_PASS=password' --volume=$(pwd)/data/postgresql:/var/lib/postgresql quay.io/sameersbn/postgresql:9.4-5
  2 +sudo docker run --name=postgresql-redmine -d --env='DB_NAME=redmine_production' --env='DB_USER=redmine' --env='DB_PASS=password' --volume=$(pwd)/data/postgresql:/var/lib/postgresql quay.io/sameersbn/postgresql:9.5-3
3 3 sudo docker run --name=redmine -d --link=postgresql-redmine:postgresql --publish=10080:80 --env='REDMINE_PORT=10080' --volume=$(pwd)/data/redmine:/home/redmine/data quay.io/sameersbn/redmine:3.1.1-3
4 4 success=false
5 5 for delay in 15 15 15 15 15 30 30 30 30 30 30 30 30 60 60 60 60 120 240 512 ; do
... ...
1   -for i in test-gitlab test-mysql test-redis ; do sudo docker stop $i || true ; sudo docker rm $i || true ; done
2   -for i in postgresql-redmine redmine ; do sudo docker stop $i || true ; sudo docker rm $i || true ; done
  1 +for i in test-gitlab gitlab-postgresql test-redis ; do sudo docker stop $i || true ; sudo docker rm $i || true ; done
  2 +for i in redmine postgresql-redmine ; do sudo docker stop $i || true ; sudo docker rm $i || true ; done
3 3 sudo rm -fr data
... ...
... ... @@ -74,8 +74,6 @@ class TestCephQaSuite(object):
74 74 10,
75 75 '-s',
76 76 'dummy',
77   - '--teuthology-branch',
78   - 'master',
79 77 '--teuthology-git-url',
80 78 'http://github.com/SUSE/teuthology',
81 79 'distros/all/jessie-8.0.yaml']
... ... @@ -105,8 +103,9 @@ class TestCephQaSuite(object):
105 103 assert os.path.exists(public_key)
106 104 keypair = json.loads(util.sh(
107 105 "openstack keypair show -f json " + key_name))
108   - fingerprint = util.sh(
109   - "ssh-keygen -l -f " + public_key + " | cut -d' ' -f2")
  106 + fingerprint = util.sh("ssh-keygen -Emd5 -l -f " + public_key + " 2>/dev/null | sed -e 's/.*MD5:\([^ ]*\).*/\\1/'")
  107 + if not fingerprint:
  108 + fingerprint = util.sh("ssh-keygen -l -f " + public_key + " | cut -d' ' -f2")
110 109 assert openstack.OpenStack.get_value(
111 110 keypair, 'fingerprint') == fingerprint.strip()
112 111
... ...
Please register or login to post a comment