Avoid creating complex certs during the bootstrap tests. #6794

Merged
merged 1 commit into from Jan 13, 2017

Conversation

Projects
None yet
4 participants
Owner

howbazaar commented Jan 13, 2017

This branch introduces a set collection of testing CA certs to be used when using a mocked NewCA method in the testing package.

This is to speed up the bootstrap tests both locally and on arm64, where there is no fast path cert generation. The certificate generation on arm64, and occasionally on race builds, was causing tests to time out. The two slow parts were the generation of the initial CA cert, and the NewLeaf calls. The NewLeaf calls are sped up by using only 128 bit keys in the tests than 2048.

Additionally for a testing NullContext, we now write stdout and stderr to the gocheck log rather than just discarding.

Owner

howbazaar commented Jan 13, 2017

== QA

Running the tests. Prior to the change the BootstrapSuite took the following time to run on my machine:
normal 22.612s
race 101.405s

After this change:
normal 2.444s
race 9.517s

axw approved these changes Jan 13, 2017

Owner

howbazaar commented Jan 13, 2017

$$merge$$

Contributor

jujubot commented Jan 13, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

Contributor

jujubot commented Jan 13, 2017

Build failed: Tests failed
build url: http://juju-ci.vapour.ws:8080/job/github-merge-juju/10010

Owner

howbazaar commented Jan 13, 2017

$$try-again$$

Contributor

jujubot commented Jan 13, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit 3d3c1b2 into juju:2.1 Jan 13, 2017

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