Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run google-cloud-python system tests against new runtime images. #39

Merged
merged 13 commits into from
Nov 3, 2016
21 changes: 9 additions & 12 deletions system_tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,23 @@ FROM google/python
# TODO: Encrypt/decrypt secrets
ADD data/ data/
ENV GOOGLE_APPLICATION_CREDENTIALS /app/data/cloud-python-runtime-qa-credentials.json
ENV GCLOUD_PROJECT cloud-python-runtime-qa

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will you file an issue to figure out how to not hardcode these? (I'm thinking just passing them to docker run, but we can address it later).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Filed as #42


# Get the source.
RUN git clone https://github.com/GoogleCloudPlatform/google-cloud-python.git
WORKDIR google-cloud-python

# Checkout the latest release.
# TODO: Enable once the latest release works
#RUN git checkout $(git describe --tags --abbrev=0)

# Install gcloud so we can do test setup
RUN apt-get update && apt-get install curl
RUN curl https://sdk.cloud.google.com | bash
ENV PATH ${PATH}:/root/google-cloud-sdk/bin
#RUN apt-get update && apt-get install curl

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you keeping this around in case you need it again in the future? Maybe just make a gist?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, that was supposed to be amended before I pushed. Fixed.

#RUN curl https://sdk.cloud.google.com | bash
#ENV PATH ${PATH}:/root/google-cloud-sdk/bin

# System test setup as per google-cloud-python/CONTRIBUTING.rst
RUN gcloud config set project cloud-python-runtime-qa
RUN gcloud components install app-engine-python
RUN gcloud auth activate-service-account \
--key-file=${GOOGLE_APPLICATION_CREDENTIALS}
RUN gcloud preview datastore create-indexes system_tests/data/index.yaml
#RUN gcloud config set project cloud-python-runtime-qa
#RUN gcloud components install app-engine-python
#RUN gcloud auth activate-service-account \
# --key-file=${GOOGLE_APPLICATION_CREDENTIALS}
# RUN gcloud preview datastore create-indexes system_tests/data/index.yaml
# TODO: python system_tests/clear_datastore.py
# TODO: python system_tests/populate_datastore.py

Expand Down
4 changes: 0 additions & 4 deletions tests/google-cloud-python/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ RUN pip install --upgrade tox
RUN git clone https://github.com/GoogleCloudPlatform/google-cloud-python.git
WORKDIR google-cloud-python

# Checkout the latest release.
# TODO: Enable once run_unit_tests.py is released
#RUN git checkout $(git describe --tags --abbrev=0)

# Run Python 2.7 unit tests
RUN python2.7 scripts/run_unit_tests.py

Expand Down