Skip to content

Commit 5899db3

Browse files
author
Keerthan Mala
committed
fix(tests): update the tests according to the storage layer chagnes
1 parent 346c252 commit 5899db3

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

contrib/ci/test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ echo "1234567890123456789012345678901234567890" > $CURRENT_DIR/tmp/aws-admin/acc
3232
# create fake AWS credentials for minio user credentials
3333
mkdir -p $CURRENT_DIR/tmp/aws-user
3434
# needs to be 20 characters long
35+
echo "12345678901234567890" > $CURRENT_DIR/tmp/aws-user/accesskey
3536
echo "12345678901234567890" > $CURRENT_DIR/tmp/aws-user/access-key-id
3637
# needs to be 40 characters long
38+
echo "1234567890123456789012345678901234567890" > $CURRENT_DIR/tmp/aws-user/secretkey
3739
echo "1234567890123456789012345678901234567890" > $CURRENT_DIR/tmp/aws-user/access-secret-key
3840

3941
puts-step "creating fake kubernetes service account token"
@@ -47,7 +49,7 @@ echo "cert" > $CURRENT_DIR/tmp/k8s/ca.crt
4749
MINIO_JOB=$(docker run -dv $CURRENT_DIR/tmp/aws-admin:/var/run/secrets/deis/minio/admin -v $CURRENT_DIR/tmp/aws-user:/var/run/secrets/deis/minio/user -v $CURRENT_DIR/tmp/k8s:/var/run/secrets/kubernetes.io/serviceaccount quay.io/deisci/minio:canary boot server /home/minio/)
4850

4951
# boot postgres, linking the minio container and setting DEIS_MINIO_SERVICE_HOST and DEIS_MINIO_SERVICE_PORT
50-
PG_JOB=$(docker run -d --link $MINIO_JOB:minio -e BACKUP_FREQUENCY=1s -e DEIS_MINIO_SERVICE_HOST=minio -e DEIS_MINIO_SERVICE_PORT=9000 -v $CURRENT_DIR/tmp/creds:/var/run/secrets/deis/database/creds -v $CURRENT_DIR/tmp/aws-user:/etc/wal-e.d/env $1)
52+
PG_JOB=$(docker run -d --link $MINIO_JOB:minio -e BACKUP_FREQUENCY=1s -e DATABASE_STORAGE=minio -e DEIS_MINIO_SERVICE_HOST=minio -e DEIS_MINIO_SERVICE_PORT=9000 -v $CURRENT_DIR/tmp/creds:/var/run/secrets/deis/database/creds -v $CURRENT_DIR/tmp/aws-user:/var/run/secrets/deis/objectstore/creds $1)
5153

5254
# wait for postgres to boot
5355
puts-step "sleeping for 90s while postgres is booting..."

rootfs/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ RUN curl -sSL https://raw.githubusercontent.com/pypa/pip/7.1.2/contrib/get-pip.p
5858

5959
# install deis/wal-e from the tip of the boto3-upgrade branch
6060
# NOTE (bacongobbler): we use the commit here so Docker's cache will bust when we make changes upstream
61-
RUN pip install --disable-pip-version-check --no-cache-dir git+https://github.com/kmala/wal-e.git@5c869f9ecc73b2a73a4b87b41b7b44be086b1e4a
61+
RUN pip install --disable-pip-version-check --no-cache-dir git+https://github.com/kmala/wal-e.git@3c1729302db6a38ae32709da24d91a5caa264499
6262

6363
# install python port of daemontools
6464
RUN pip install --disable-pip-version-check --no-cache-dir envdir

rootfs/bin/create_bucket

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ from botocore.client import Config
1111
from oauth2client.service_account import ServiceAccountCredentials
1212
from gcloud.storage.client import Client
1313
from gcloud import exceptions
14-
from azure.storage.blob import BlobService
14+
from azure.storage.blob import BlockBlobService
1515

1616
bucket_name = os.getenv('BUCKET_NAME')
1717

@@ -49,9 +49,9 @@ elif os.getenv('DATABASE_STORAGE') == "gcs":
4949
client.create_bucket(bucket_name)
5050

5151
elif os.getenv('DATABASE_STORAGE') == "azure":
52-
blob_service = BlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
53-
#It doesn't throw an exception if the container exists by default(https://github.com/Azure/azure-storage-python/blob/v0.20.3/azure/storage/blob/blobservice.py#L298).
54-
blob_service.create_container(bucket_name)
52+
block_blob_service = BlockBlobService(account_name=os.getenv('WABS_ACCOUNT_NAME'), account_key=os.getenv('WABS_ACCESS_KEY'))
53+
#It doesn't throw an exception if the container exists by default(https://github.com/Azure/azure-storage-python/blob/master/azure/storage/blob/baseblobservice.py#L504).
54+
block_blob_service.create_container(bucket_name)
5555

5656
else :
5757
conn = boto3.resource('s3', endpoint_url=os.getenv('S3_URL'), config=Config(signature_version='s3v4'))

0 commit comments

Comments
 (0)