Skip to content
Snippets Groups Projects
Commit 29c0229f authored by Josh Brooks's avatar Josh Brooks
Browse files

Allow for disabling TLS in tests

parent 268f44b8
No related branches found
No related tags found
2 merge requests!117Release,!77Xx 3563/disable tls check
......@@ -9,6 +9,7 @@ package gateway
import (
"fmt"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/storage"
"gitlab.com/elixxir/comms/network"
"gitlab.com/elixxir/crypto/fastRNG"
......@@ -16,10 +17,17 @@ import (
"gitlab.com/xx_network/crypto/csprng"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/ndf"
"os"
"reflect"
"testing"
)
func TestMain(m *testing.M) {
jww.SetStdoutThreshold(jww.LevelTrace)
connect.TestingOnlyDisableTLS = true
os.Exit(m.Run())
}
// Unit test
func TestNewHostPool(t *testing.T) {
manager := newMockManager()
......
......@@ -2,6 +2,7 @@ package message
import (
"encoding/binary"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/client/interfaces/message"
"gitlab.com/elixxir/client/interfaces/params"
"gitlab.com/elixxir/client/network/gateway"
......@@ -13,13 +14,21 @@ import (
"gitlab.com/elixxir/comms/client"
"gitlab.com/elixxir/crypto/fastRNG"
"gitlab.com/elixxir/primitives/format"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/crypto/csprng"
"gitlab.com/xx_network/primitives/netTime"
"math/rand"
"os"
"testing"
"time"
)
func TestMain(m *testing.M) {
jww.SetStdoutThreshold(jww.LevelTrace)
connect.TestingOnlyDisableTLS = true
os.Exit(m.Run())
}
type TestListener struct {
ch chan bool
}
......
......@@ -8,17 +8,26 @@
package rounds
import (
jww "github.com/spf13/jwalterweatherman"
bloom "gitlab.com/elixxir/bloomfilter"
"gitlab.com/elixxir/client/interfaces"
"gitlab.com/elixxir/client/storage/reception"
"gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/id/ephemeral"
"os"
"reflect"
"testing"
"time"
)
func TestMain(m *testing.M) {
jww.SetStdoutThreshold(jww.LevelTrace)
connect.TestingOnlyDisableTLS = true
os.Exit(m.Run())
}
// Unit test NewRemoteFilter
func TestNewRemoteFilter(t *testing.T) {
bloomFilter := &mixmessages.ClientBloom{
......
......@@ -8,12 +8,21 @@
package registration
import (
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/comms/client"
"gitlab.com/xx_network/comms/connect"
"gitlab.com/xx_network/primitives/id"
"gitlab.com/xx_network/primitives/ndf"
"os"
"testing"
)
func TestMain(m *testing.M) {
jww.SetStdoutThreshold(jww.LevelTrace)
connect.TestingOnlyDisableTLS = true
os.Exit(m.Run())
}
// Init should create a valid Registration communications struct
func TestInit(t *testing.T) {
// Create dummy comms and ndf
......
package ud
import (
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/comms/client"
pb "gitlab.com/elixxir/comms/mixmessages"
"gitlab.com/elixxir/primitives/fact"
......@@ -8,9 +9,16 @@ import (
"gitlab.com/xx_network/crypto/csprng"
"gitlab.com/xx_network/crypto/signature/rsa"
"gitlab.com/xx_network/primitives/id"
"os"
"testing"
)
func TestMain(m *testing.M) {
jww.SetStdoutThreshold(jww.LevelTrace)
connect.TestingOnlyDisableTLS = true
os.Exit(m.Run())
}
type testAFC struct{}
// Dummy implementation of SendRegisterFact so that we don't need to run our own
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment