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

Commit

Permalink
Merge pull request #60 from cr/onecrlfix
Browse files Browse the repository at this point in the history
OneCRL bugfix release
  • Loading branch information
cr authored Jun 2, 2017
2 parents 1a4f1ff + 7607c7b commit bdc1aff
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Long argument | Short | Choices / **default** | Description
--timeout | -m | 10 | Request timeout in seconds. Running more requests in parallel increases network latency and results in more timeouts.
--test | -t | release, **nightly**, beta, aurora, esr | Test candidate. Any error that it produces that do not occur in baseline are reported.
--base | -b | **release**, nightly, beta, aurora, esr | Baseline to test against. No error that appears in baseline can make it to the report.
--onecrl | -o | **prod**, stage, custom | OneCRL revocation list to install to the test profiles. `custom` uses a pre-configured, static list.
--onecrl | -o | **production**, stage, custom | OneCRL revocation list to install to the test profiles. `custom` uses a pre-configured, static list.
--ipython | -i | | Drops into an IPython shell
--limit | -l | | The number of hosts in the test set is limited to the given number. The default is to scan all the hosts in the set.
--filter | -f | 0, **1** | The default filter level 1 removes network timeouts from the report which may appear spuriously. Filter level 0 applies no filtering.
Expand Down
10 changes: 5 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def get_argparser():
release_choice, _, test_default, base_default = fd.FirefoxDownloader.list()

parser = argparse.ArgumentParser(prog="tls_canary")
parser.add_argument('--version', action='version', version='%(prog)s 3.0.0')
parser.add_argument('--version', action='version', version='%(prog)s 3.0.1')
parser.add_argument('-d', '--debug',
help='Enable debug',
action='store_true',
Expand Down Expand Up @@ -86,9 +86,9 @@ def get_argparser():
parser.add_argument('-o', '--onecrl',
help='OneCRL set to test (default: prod)',
type=str.lower,
choices=["prod", "stage", "custom"],
choices=["production", "stage", "custom"],
action='store',
default='prod')
default='production')
parser.add_argument('-i', '--ipython',
help='Drop into ipython shell after test run',
action='store_true',
Expand Down Expand Up @@ -375,7 +375,7 @@ def make_profiles(args):
dir_util.copy_tree(default_profile_dir, release_profile_dir)

logger.info("Updating OneCRL revocation data")
if args.onecrl == "prod" or args.onecrl == "stage":
if args.onecrl == "production" or args.onecrl == "stage":
# overwrite revocations file in test profile with live OneCRL entries from requested environment
revocations_file = one_crl.get_list(args.onecrl, args.workdir)
profile_file = os.path.join(test_profile_dir, "revocations.txt")
Expand All @@ -386,7 +386,7 @@ def make_profiles(args):
logger.info("Testing with custom OneCRL entries from default profile")

# get live OneCRL entries from production for release profile
revocations_file = one_crl.get_list("prod", args.workdir)
revocations_file = one_crl.get_list("production", args.workdir)
profile_file = os.path.join(release_profile_dir, "revocations.txt")
logger.debug("Writing OneCRL revocations data to `%s`" % profile_file)
shutil.copyfile(revocations_file, profile_file)
Expand Down
4 changes: 2 additions & 2 deletions one_crl_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_list(onecrl_env, workdir, use_cache=True, cache_timeout=60*60):
# Install / update oneCRL2RevocationsTxt package
package = "github.com/mozmark/OneCRL-Tools/oneCRL2RevocationsTxt"
logger.debug("Installing / updating Go package `%s`" % package)
if subprocess.call([go_bin, "get", package], env=go_env) != 0:
if subprocess.call([go_bin, "get", "-u", package], env=go_env) != 0:
logger.critical("Cannot get Go package `%s`" % package)
sys.exit(5)
if subprocess.call([go_bin, "install", package], env=go_env) != 0:
Expand All @@ -57,7 +57,7 @@ def get_list(onecrl_env, workdir, use_cache=True, cache_timeout=60*60):
if not os.path.isfile(onecrl_bin):
logger.critical("Go package `oneCRL2RevocationsTxt` is missing executable")
sys.exit(5)
onecrl_cmd = [onecrl_bin, "--env", onecrl_env]
onecrl_cmd = [onecrl_bin, "--onecrlenv", onecrl_env]
logger.debug("Running shell command `%s`" % " ".join(onecrl_cmd))
try:
revocations_data = subprocess.check_output(onecrl_cmd, env=go_env)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from setuptools import setup, find_packages

PACKAGE_VERSION = '3.0.0'
PACKAGE_VERSION = '3.0.1'

# Dependencies
with open('requirements.txt') as f:
Expand Down

0 comments on commit bdc1aff

Please sign in to comment.