From 37cb419b1c59a49b77a7bcf748a617f47de3c2ce Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Fri, 16 Oct 2015 22:28:22 +0000 Subject: [PATCH 1/4] Switch to Go 1.5.1 (fixes #955) --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3041fdd82..ff8a1038a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ services: # http://docs.travis-ci.com/user/ci-environment/#CI-environment-OS # gimme has to be kept in sync with Boulder's Go version setting in .travis.yml before_install: - - '[ "xxx$BOULDER_INTEGRATION" = "xxx" ] || eval "$(gimme 1.5)"' + - '[ "xxx$BOULDER_INTEGRATION" = "xxx" ] || eval "$(gimme 1.5.1)"' # using separate envs with different TOXENVs creates 4x1 Travis build # matrix, which allows us to clearly distinguish which component under From 6eae746735d57bbe6dacc1c5e934aa5289da3334 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sat, 17 Oct 2015 18:06:10 +0000 Subject: [PATCH 2/4] Clean up after simplehttp port change to 5002. Now, when https://github.com/letsencrypt/boulder/pull/998 is in, we can remove all quick fixes for https://github.com/letsencrypt/boulder/issues/985. --- tests/boulder-integration.sh | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/tests/boulder-integration.sh b/tests/boulder-integration.sh index f01c0eff3..7c0ee8fea 100755 --- a/tests/boulder-integration.sh +++ b/tests/boulder-integration.sh @@ -27,30 +27,14 @@ common() { "$@" } -# TODO: boulder#985 -common_dvsni() { - common \ - --standalone-supported-challenges dvsni \ - --dvsni-port 5001 \ - --simple-http-port 0 \ - "$@" -} -common_http() { - common \ - --standalone-supported-challenges simpleHttp \ - --dvsni-port 0 \ - --simple-http-port ${SIMPLE_HTTP_PORT:-5001} \ - "$@" -} - -common_dvsni --domains le1.wtf auth -common_http --domains le2.wtf run -common_http -a manual -d le.wtf auth +common --domains le1.wtf --standalone-supported-challenges dvsni auth +common --domains le2.wtf --standalone-supported-challenges simpleHttp run +common -a manual -d le.wtf auth export CSR_PATH="${root}/csr.der" KEY_PATH="${root}/key.pem" \ OPENSSL_CNF=examples/openssl.cnf ./examples/generate-csr.sh le3.wtf -common_dvsni auth --csr "$CSR_PATH" \ +common auth --csr "$CSR_PATH" \ --cert-path "${root}/csr/cert.pem" \ --chain-path "${root}/csr/chain.pem" openssl x509 -in "${root}/csr/0000_cert.pem" -text From 4090085b17f6a652cc0ba1a6d9c7df71f81745ed Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sun, 18 Oct 2015 12:22:54 +0000 Subject: [PATCH 3/4] Avoid race conditions in acme.standalone_test. --- acme/acme/standalone_test.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/acme/acme/standalone_test.py b/acme/acme/standalone_test.py index 14d212d6e..2230bfccf 100644 --- a/acme/acme/standalone_test.py +++ b/acme/acme/standalone_test.py @@ -35,14 +35,19 @@ class ACMEServerMixinTest(unittest.TestCase): def setUp(self): from acme.standalone import ACMEServerMixin + class _MockHandler(socketserver.BaseRequestHandler): + def handle(self): + self.request.sendall(b"DONE") + class _MockServer(socketserver.TCPServer, ACMEServerMixin): def __init__(self, *args, **kwargs): socketserver.TCPServer.__init__(self, *args, **kwargs) ACMEServerMixin.__init__(self) - self.server = _MockServer(("", 0), socketserver.BaseRequestHandler) + + self.server = _MockServer(("", 0), _MockHandler) def _busy_wait(self): # pragma: no cover - # This function is used to avoid race coditions in tests, but + # This function is used to avoid race conditions in tests, but # not all of the functionality is always used, hence "no # cover" while True: @@ -53,6 +58,7 @@ class ACMEServerMixinTest(unittest.TestCase): except socket.error: pass else: + sock.recv(4) # wait until handle_request is actually called break finally: sock.close() From 7a9ceaae2ee0f037ebb1e1da157d2303a7396761 Mon Sep 17 00:00:00 2001 From: Jakub Warmuz Date: Sun, 18 Oct 2015 12:33:06 +0000 Subject: [PATCH 4/4] lint --- acme/acme/standalone_test.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/acme/acme/standalone_test.py b/acme/acme/standalone_test.py index 2230bfccf..5dd6c2952 100644 --- a/acme/acme/standalone_test.py +++ b/acme/acme/standalone_test.py @@ -36,6 +36,8 @@ class ACMEServerMixinTest(unittest.TestCase): from acme.standalone import ACMEServerMixin class _MockHandler(socketserver.BaseRequestHandler): + # pylint: disable=missing-docstring,no-member,no-init + def handle(self): self.request.sendall(b"DONE")