fixed tests

This commit is contained in:
Andrej Zavgorodnij 2020-09-10 18:09:18 +03:00
parent ebce1c9549
commit a35cb5ab59
2 changed files with 7 additions and 24 deletions

View File

@ -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"

View File

@ -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")