Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Final iteration to make system tests pass.#171

Merged
dhermes merged 1 commit intogoogleapis:masterfrom
dhermes:system-tests-final-nail-in-coffin
May 3, 2015
Merged

Final iteration to make system tests pass.#171
dhermes merged 1 commit intogoogleapis:masterfrom
dhermes:system-tests-final-nail-in-coffin

Conversation

@dhermes
Copy link
Copy Markdown
Contributor

@dhermes dhermes commented May 3, 2015

Two main things happened here:

  1. Manually encrypted files instead of using travis encrypt-file
  2. Removed OAUTH2CLIENT_TEST_USER_KEY_PATH fallback.

The first was because travis encrypt-file was failing mysteriously.
To make up, I ran

openssl enc -d -a -md sha1 -aes-256-cbc -nosalt -p

and typed random noise into the keyboard to create a candidate KEY and
IV (H/T http://superuser.com/a/471524). After doing this, they were set
via

travis env set OAUTH2CLIENT_KEY "..KEY.." --repo "google/oauth2client"
travis env set OAUTH2CLIENT_IV "..IV.." --repo "google/oauth2client"

To actually do the encryption locally:

openssl aes-256-cbc -K "..KEY.." \
    -iv "..IV.." \
    -in file-to-encrypt \
    -out file-to-encrypt.enc -e

As for the second change, OAUTH2CLIENT_TEST_USER_KEY_PATH was previously
allowed to fallback to client._get_well_known_file() in system tests, but this
is a problem since that function throws an OSError when the directory does not
exist. (It does not exist on Travis.)

Two main things happened here:

1. Manually encrypted files instead of using `travis encrypt-file`
2. Removed OAUTH2CLIENT_TEST_USER_KEY_PATH fallback.

The first was because `travis encrypt-file` was failing mysteriously.
To make up, I ran

    openssl enc -d -a -md sha1 -aes-256-cbc -nosalt -p

and typed random noise into the keyboard to create a candidate KEY and
IV (H/T http://superuser.com/a/471524). After doing this, they were set
via

    travis env set OAUTH2CLIENT_KEY "..KEY.." --repo "google/oauth2client"
    travis env set OAUTH2CLIENT_IV "..IV.." --repo "google/oauth2client"

To actually do the encryption locally:

    openssl aes-256-cbc -K "..KEY.." \
        -iv "..IV.." \
        -in file-to-encrypt \
        -out file-to-encrypt.enc -e

As for the second change, OAUTH2CLIENT_TEST_USER_KEY_PATH was previously
allowed to fallback to client._get_well_known_file() in system tests, but this
is a problem since that function throws an OSError when the directory does not
exist. (It does not exist on Travis.)
@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 65.01% when pulling 381aac7 on dhermes:system-tests-final-nail-in-coffin into 1929a8c on google:master.

dhermes added a commit that referenced this pull request May 3, 2015
Final iteration to make system tests pass.
@dhermes dhermes merged commit 3a742ee into googleapis:master May 3, 2015
@dhermes
Copy link
Copy Markdown
Contributor Author

dhermes commented May 3, 2015

@nathanielmanistaatgoogle I gave up on travis encrypt-file and just did the encryption manually.

Merged this so we can make sure it works on merged requests.

@dhermes
Copy link
Copy Markdown
Contributor Author

dhermes commented May 3, 2015

@dhermes dhermes deleted the system-tests-final-nail-in-coffin branch May 3, 2015 21:55
@nathanielmanistaatgoogle
Copy link
Copy Markdown
Contributor

Hooray!

@dhermes
Copy link
Copy Markdown
Contributor Author

dhermes commented May 4, 2015

But what the heck travis encrypt-file?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants