Skip to content

Commit

Permalink
Fix EventHub event source for tests
Browse files Browse the repository at this point in the history
Change-Id: I8006f84e3ba6ae389b49fba359e696eec352ae46
Signed-off-by: Sandra Vrtikapa <sandra.vrtikapa@securekey.com>
  • Loading branch information
sandrask committed Apr 6, 2017
1 parent c0d0e22 commit ca82dda
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
7 changes: 1 addition & 6 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,12 +158,7 @@ func GetPeersConfig() []PeerConfig {
if p.Port == "" {
panic(fmt.Sprintf("port key not exist or empty for %s", key))
}
if p.EventHost == "" {
panic(fmt.Sprintf("event_host not exist or empty for %s", key))
}
if p.EventPort == "" {
panic(fmt.Sprintf("event_port not exist or empty for %s", key))
}

if IsTLSEnabled() && p.TLSCertificate == "" {
panic(fmt.Sprintf("tls.certificate not exist or empty for %s", key))
}
Expand Down
2 changes: 0 additions & 2 deletions test/fixtures/config/config_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ client:
peer2:
host: "localhost"
port: 7056
event_host: "localhost"
event_port: 7058
tls:
# Certificate location absolute path
certificate: "$GOPATH/src/github.com/hyperledger/fabric-sdk-go/test/fixtures/tls/peers/peer1/ca-cert.pem"
Expand Down
1 change: 1 addition & 0 deletions test/integration/base_test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ func (setup *BaseSetupImpl) GetEventHub() (events.EventHub, error) {
foundEventHub := false
for _, p := range config.GetPeersConfig() {
if p.EventHost != "" && p.EventPort != "" {
fmt.Printf("******* EventHub connect to peer (%s:%s) *******\n", p.EventHost, p.EventPort)
eventHub.SetPeerAddr(fmt.Sprintf("%s:%s", p.EventHost, p.EventPort), p.TLSCertificate, p.TLSServerHostOverride)
foundEventHub = true
break
Expand Down

0 comments on commit ca82dda

Please sign in to comment.