Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1 from edx/jarv/single-server-config
Browse files Browse the repository at this point in the history
changes to support certificates on disk in addition to S3
  • Loading branch information
jarv committed Apr 17, 2014
2 parents 616ba2b + 52f37b3 commit c203831
Show file tree
Hide file tree
Showing 17 changed files with 220 additions and 192 deletions.
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Travis CI configuration file for running tests
language: python
python:
- "2.7"
install:
- "pip install --allow-all-external -r requirements.txt"
script:
- |
curl https://raw.githubusercontent.com/edx/configuration/master/playbooks/roles/certs/files/example-private-key.txt -o /var/tmp/key.txt
curl https://raw.githubusercontent.com/edx/configuration/rc/injera/playbooks/roles/certs/files/example-key-ownertrust.txt -o /var/tmp/trust.txt
/usr/bin/gpg --import /var/tmp/key.txt
/usr/bin/gpg --import-ownertrust /var/tmp/trust.txt
nosetests tests.gen_cert_test:test_cert_gen
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,20 @@ To run the test suite:
CERT_AWS_ID = # Amazon Web Services ID
CERT_AWS_KEY = # Amazon Web Services Key
CERT_BUCKET = # Amazon Web Services S3 bucket name

2. From the `certificates` directory, run:
It is also acceptable to leave the AWS KEY and ID values as none and instead
use .boto file or run this code from a server that has an
IAM role that gives it write access to the bucket in the configuration.

2. To run all of the tests from the `certificates` directory, run:

nosetests

Note that this will run tests that will fail unless AWS credentials are setup. To run just
the tests for local on-disk publishing run:

nosetests tests.gen_cert_test:test_cert_gen


**Troubleshooting**: If tests fail with errors, try running:

Expand Down
2 changes: 1 addition & 1 deletion create_pdfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def main():
)
(download_uuid, verify_uuid,
download_url) = cert.create_and_upload(
name, upload=True, cleanup=False)
name, upload=True, copy_to_webroot=False, cleanup=False)
certificate_data.append([name, download_url])
gen_dir = os.path.join(
cert.dir_prefix, S3_CERT_PATH, download_uuid)
Expand Down
Loading

0 comments on commit c203831

Please sign in to comment.