Override controller cert generation during tests #6663

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 participants
Contributor

bz2 commented Dec 6, 2016

Add hook point in controller cert generation function so that
fake certs can be injected during testing.

Without a fast path, cert generation takes ~9s on our arm64 test
machine. Even on an amd64 machine it can take ~500ms per test.

QA steps

  • cd $GOPATH/src/github.com/juju/juju/apiserver
  • go test -i
  • go test -check.vv -check.f ".*serverSuite\.TestStop"|grep -F "WARNING juju.controller" - should have warning about overriding certs
  • go test -test.cpuprofile cpu.prof -check.f ".*serverSuite\.TestStop"
  • go tool pprof apiserver.test cpu.prof
  • (pprof) tree - validate controller.GenerateControllerCertAndKey does not dominate
Override controller cert generation during tests
Add hook point in controller cert generation function so that
fake certs can be injected during testing.

Without a fast path, cert generation takes ~9s on our arm64 test
machine. Even on an amd64 machine it can take ~500ms per test.
Contributor

reedobrien commented Dec 14, 2016

!!build!!

Contributor

reedobrien commented Dec 14, 2016

QA checks out. controller.GenerateControllerCertAndKey is not is the top 80 on my system.

reedobrien approved these changes Dec 14, 2016 edited

LGTM. Pending passing checks.

Owner

howbazaar commented Jan 17, 2017

Addressed a different way now.

@howbazaar howbazaar closed this Jan 17, 2017

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