Permalink
Browse files

getting tests to run again

  • Loading branch information...
1 parent d66765e commit 92fc3f25f89b3f7ca371e5792f943d2cff200d69 @cloudnautique cloudnautique committed Aug 3, 2015
Showing with 23 additions and 12 deletions.
  1. +1 −1 Dockerfile
  2. +12 −3 scripts/test
  3. +1 −7 tests/server/ranchertests/test_cattles.py
  4. +1 −1 tests/server/test-requirements.txt
  5. +8 −0 tests/server/tox.ini
View
@@ -1,4 +1,4 @@
-FROM rancher/dind:v0.3.0
+FROM rancher/dind:v0.5.0
COPY ./scripts/bootstrap /scripts/bootstrap
RUN /scripts/bootstrap
WORKDIR /source
View
@@ -1,6 +1,6 @@
#!/bin/bash
-COMPOSE="/usr/local/bin/docker-compose"
+COMPOSE="docker-compose"
teardown()
{
@@ -12,14 +12,18 @@ wait_for_env()
{
local url=$1
echo "Checking for $url availability"
- for ((i=0;i<180;i++))
+ for ((i=0;i<300;i++))
do
if [[ "$(curl -s ${url}/ping)" = "pong" ]]; then
if [[ "$i" = "1" ]]; then
echo "Environment at ${url} did not come up"
fi
break
else
+ if [[ "$i" -eq "299" ]]; then
+ echo "Env did not start"
+ exit 1
+ fi
sleep 1
fi
done
@@ -62,9 +66,14 @@ if [ $(command -v boot2docker) ]; then
export DOCKER_IP=$(boot2docker ip)
fi
+if [ $(command -v docker-machine) ]; then
+ machine=$(docker-machine active)
+ export DOCKER_IP=$(docker-machine ip ${machine})
+fi
+
cd $(dirname $0)/..
pushd ./server > /dev/null
-./build-image.sh
+TAG=dev ./build-image.sh
popd > /dev/null
# Just doing server for now.
@@ -1,23 +1,17 @@
import os
import cattle
import pytest
-import gdapi
from docker import Client
from docker.utils import kwargs_from_env
-ADMIN_HEADERS = dict(gdapi.HEADERS)
-ADMIN_HEADERS['X-API-Project-Id'] = 'USER'
-
-
class CattleConfig(object):
def __init__(self, url_env):
self.url_env = url_env
def _get_client(self):
client = cattle.from_env(url=self.cattle_url(),
- cache=False,
- headers=ADMIN_HEADERS)
+ cache=False)
assert client.valid()
return client
@@ -2,4 +2,4 @@ pytest
cattle==0.4.0
flake8
docker-py
-requests==2.6.0
+requests[security]==2.7.0
@@ -4,6 +4,14 @@ envlist=flake8, py27
[testenv]
deps=-rtest-requirements.txt
commands=py.test {posargs:--duration=20 -vv ranchertests}
+passenv = CATTLE_H2DB_TEST_URL
+ CATTLE_MYSQL_LINK_TEST_URL
+ CATTLE_MYSQL_LOCAL_TEST_URL
+ CATTLE_MYSQL_MANUAL_TEST_URL
+ DOCKER_HOST
+ DOCKER_CERT_PATH
+ DOCKER_MACHINE_NAME
+ DOCKER_TLS_VERIFY
[testenv:flake8]
deps=-rtest-requirements.txt

0 comments on commit 92fc3f2

Please sign in to comment.