mirror of https://github.com/certusone/dc4bc.git
fixed tests
This commit is contained in:
parent
ebce1c9549
commit
a35cb5ab59
|
@ -9,6 +9,8 @@ import (
|
|||
"io/ioutil"
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
|
@ -128,6 +130,11 @@ func (n *node) run(t *testing.T) {
|
|||
}
|
||||
|
||||
func TestFullFlow(t *testing.T) {
|
||||
files, _ := filepath.Glob("/tmp/dc4bc_*")
|
||||
for _, f := range files {
|
||||
_ = os.Remove(f)
|
||||
}
|
||||
|
||||
var numNodes = 4
|
||||
var threshold = 3
|
||||
var storagePath = "/tmp/dc4bc_storage"
|
||||
|
|
|
@ -8,30 +8,6 @@ import (
|
|||
)
|
||||
|
||||
// kafkacat -C -b localhost -t messages
|
||||
//func TestKafkaStorage_Send(t *testing.T) {
|
||||
// if testing.Short() {
|
||||
// t.Skip("skipping long test")
|
||||
// }
|
||||
//
|
||||
// req := require.New(t)
|
||||
// stg, err := NewKafkaStorage(context.Background(), "localhost:9092")
|
||||
// req.NoError(err)
|
||||
//
|
||||
// t.Run("test_kafka_storage_send", func(t *testing.T) {
|
||||
// _, err = stg.Send(Message{
|
||||
// ID: "test_message_id",
|
||||
// DkgRoundID: "test_dkg_round_id",
|
||||
// Event: "test_event",
|
||||
// Data: []byte("test_data"),
|
||||
// Signature: []byte("test_signature"),
|
||||
// SenderAddr: "test_sender_addr",
|
||||
// RecipientAddr: "test_recipient_addr",
|
||||
// })
|
||||
//
|
||||
// req.NoError(err)
|
||||
// })
|
||||
//}
|
||||
|
||||
func TestKafkaStorage_GetMessages(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("skipping long test")
|
||||
|
|
Loading…
Reference in New Issue