Skip to content

Commit c8deca3

Browse files
committed
add metron certs loader
1 parent f6a32e0 commit c8deca3

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test_helpers/metronserver_setup.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
package test_helpers
22

33
import (
4+
"fmt"
5+
46
loggingclient "code.cloudfoundry.org/diego-logging-client"
57
"code.cloudfoundry.org/diego-logging-client/testhelpers"
8+
"code.cloudfoundry.org/fixtures"
69
"code.cloudfoundry.org/go-loggregator/v9/rpc/loggregator_v2"
710
)
811

@@ -20,7 +23,9 @@ type MetronIngressSetup struct {
2023
}
2124

2225
func StartMetronIngress(fixturesPath string) (*MetronIngressSetup, error) {
23-
testIngressServer, err := testhelpers.NewTestIngressServer(MetronServerCertFile, MetronServerKeyFile, MetronCAFile)
26+
fmt.Println("getting metron ...")
27+
fmt.Println("*** path", fixtures.Path("CA.crt"))
28+
testIngressServer, err := testhelpers.NewTestIngressServer(fixtures.Path("CA.crt"), fixtures.Path("metron.key"), fixtures.Path("metron.crt"))
2429
if err != nil {
2530
return nil, err
2631
}
@@ -46,8 +51,8 @@ func StartMetronIngress(fixturesPath string) (*MetronIngressSetup, error) {
4651

4752
func GetLoggregatorConfigWithMetronCerts() loggingclient.Config {
4853
return loggingclient.Config{
49-
CACertPath: MetronCAFile,
50-
CertPath: MetronServerCertFile,
51-
KeyPath: MetronServerKeyFile,
54+
CACertPath: fixtures.Path("CA.crt"),
55+
CertPath: fixtures.Path("metron.crt"),
56+
KeyPath: fixtures.Path("metron.key"),
5257
}
5358
}

0 commit comments

Comments
 (0)