support runner TLS certificates with specified certificate Common Names (#900)

* support runner TLS certificates with specified certificate Common Names

* removes duplicate constant

* run in insecure mode by default but expose ability to create tls-secured runner pools programmatically

* fixes runner tests to use new tls interfaces
This commit is contained in:
Gerardo Viedma
2018-03-28 13:57:15 +01:00
committed by jan grant
parent 966890ac8f
commit 348bbaf36b
6 changed files with 29 additions and 39 deletions

View File

@@ -8,7 +8,7 @@ import (
)
func setupStaticPool(runners []string) pool.RunnerPool {
return newStaticRunnerPool(runners, mockRunnerFactory)
return NewStaticRunnerPool(runners, nil, "", mockRunnerFactory)
}
type mockStaticRunner struct {
@@ -27,7 +27,7 @@ func (r *mockStaticRunner) Address() string {
return r.address
}
func mockRunnerFactory(addr string) (pool.Runner, error) {
func mockRunnerFactory(addr, cn string, pki *pool.PKIData) (pool.Runner, error) {
return &mockStaticRunner{address: addr}, nil
}