Skip to content
Snippets Groups Projects
Commit 9e9f5952 authored by ksparakis's avatar ksparakis
Browse files

removed error string and get it from primitives for poll ndf no error

parent 6776ec27
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ require ( ...@@ -7,7 +7,7 @@ require (
cloud.google.com/go/pubsub v1.2.0 // indirect cloud.google.com/go/pubsub v1.2.0 // indirect
firebase.google.com/go v3.12.0+incompatible firebase.google.com/go v3.12.0+incompatible
github.com/go-pg/pg v8.0.6+incompatible github.com/go-pg/pg v8.0.6+incompatible
github.com/gopherjs/gopherjs v0.0.0-20191106031601-ce3c9ade29de // indirect github.com/gopherjs/gopherjs v0.0.0-20200209183636-89e6cbcd0b6d // indirect
github.com/jinzhu/inflection v1.0.0 // indirect github.com/jinzhu/inflection v1.0.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 github.com/mitchellh/go-homedir v1.1.0
github.com/onsi/ginkgo v1.12.0 // indirect github.com/onsi/ginkgo v1.12.0 // indirect
...@@ -22,15 +22,16 @@ require ( ...@@ -22,15 +22,16 @@ require (
github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.6.2 github.com/spf13/viper v1.6.2
gitlab.com/elixxir/comms v0.0.0-20200207001605-3b6328b48ed1 gitlab.com/elixxir/comms v0.0.0-20200206201144-aa6e356b3770
gitlab.com/elixxir/crypto v0.0.0-20200206203107-b8926242da23 gitlab.com/elixxir/crypto v0.0.0-20200206203107-b8926242da23
gitlab.com/elixxir/primitives v0.0.0-20200207225613-9a4445ddec16 gitlab.com/elixxir/primitives v0.0.0-20200210205543-5c55c1f6949f
golang.org/x/crypto v0.0.0-20200207205829-a95e85b341fd // indirect golang.org/x/crypto v0.0.0-20200210222208-86ce3cb69678 // indirect
golang.org/x/exp v0.0.0-20200207192155-f17229e696bd // indirect golang.org/x/exp v0.0.0-20200207192155-f17229e696bd // indirect
golang.org/x/net v0.0.0-20200202094626-16171245cfb2 golang.org/x/net v0.0.0-20200202094626-16171245cfb2
golang.org/x/tools v0.0.0-20200207224406-61798d64f025 // indirect golang.org/x/tools v0.0.0-20200210223759-b0390335f4a1 // indirect
google.golang.org/api v0.17.0 google.golang.org/api v0.17.0
google.golang.org/genproto v0.0.0-20200207204624-4f3edf09f4f6 // indirect google.golang.org/genproto v0.0.0-20200210034751-acff78025515 // indirect
google.golang.org/grpc v1.27.1 // indirect
gopkg.in/ini.v1 v1.52.0 // indirect gopkg.in/ini.v1 v1.52.0 // indirect
mellium.im/sasl v0.0.0-20190815210834-e27ea4901008 // indirect mellium.im/sasl v0.0.0-20190815210834-e27ea4901008 // indirect
) )
This diff is collapsed.
...@@ -19,8 +19,6 @@ import ( ...@@ -19,8 +19,6 @@ import (
"strings" "strings"
) )
var noNDFErr = errors.Errorf("Permissioning server does not have an ndf to give to client")
// We use an interface here inorder to allow us to mock the getHost and RequestNDF in the notifcationsBot.Comms for testing // We use an interface here inorder to allow us to mock the getHost and RequestNDF in the notifcationsBot.Comms for testing
type notificationComms interface { type notificationComms interface {
GetHost(hostId string) (*connect.Host, bool) GetHost(hostId string) (*connect.Host, bool)
...@@ -47,7 +45,7 @@ func PollNdf(currentDef *ndf.NetworkDefinition, comms notificationComms) (*ndf.N ...@@ -47,7 +45,7 @@ func PollNdf(currentDef *ndf.NetworkDefinition, comms notificationComms) (*ndf.N
response, err := comms.RequestNdf(regHost, msg) response, err := comms.RequestNdf(regHost, msg)
if err != nil { if err != nil {
errMsg := errors.Errorf("Failed to get ndf from permissioning: %v", err) errMsg := errors.Errorf("Failed to get ndf from permissioning: %v", err)
if strings.Contains(errMsg.Error(), noNDFErr.Error()) { if strings.Contains(errMsg.Error(), ndf.NO_NDF) {
jww.WARN.Println("Continuing without an updated NDF") jww.WARN.Println("Continuing without an updated NDF")
return nil, nil return nil, nil
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment