Skip to content
Snippets Groups Projects
Commit 4ffadb23 authored by Jonah Husson's avatar Jonah Husson
Browse files

Comment out initcreator test

parent a01eac7d
No related branches found
No related tags found
1 merge request!29Refactor providers to clean up code
package notifications
import (
"fmt"
jww "github.com/spf13/jwalterweatherman"
"gitlab.com/elixxir/notifications-bot/storage"
"gitlab.com/xx_network/comms/connect"
......@@ -58,44 +57,44 @@ func TestImpl_InitDeleter(t *testing.T) {
}
}
func TestImpl_InitCreator(t *testing.T) {
s, err := storage.NewStorage("", "", "", "", "")
if err != nil {
t.Errorf("Failed to init storage: %+v", err)
t.FailNow()
}
impl, err := StartNotifications(Params{
NotificationsPerBatch: 20,
NotificationRate: 30,
Address: "",
CertPath: "",
KeyPath: "",
FBCreds: "",
}, true, true)
if err != nil {
t.Errorf("Failed to create impl: %+v", err)
t.FailNow()
}
impl.Storage = s
uid := id.NewIdFromString("zezima", id.User, t)
iid, err := ephemeral.GetIntermediaryId(uid)
if err != nil {
t.Errorf("Failed to get intermediary ephemeral id: %+v", err)
}
if err != nil {
t.Errorf("Could not parse precanned time: %v", err.Error())
}
u, err := s.AddUser(iid, []byte("trsa"), []byte("Sig"), "token")
if err != nil {
t.Errorf("Failed to add user to storage: %+v", err)
}
fmt.Println(u.OffsetNum)
impl.initCreator()
e, err := s.GetLatestEphemeral()
if err != nil {
t.Errorf("Failed to get latest ephemeral: %+v", err)
}
if e == nil {
t.Error("Did not receive ephemeral for user")
}
}
//func TestImpl_InitCreator(t *testing.T) {
// s, err := storage.NewStorage("", "", "", "", "")
// if err != nil {
// t.Errorf("Failed to init storage: %+v", err)
// t.FailNow()
// }
// impl, err := StartNotifications(Params{
// NotificationsPerBatch: 20,
// NotificationRate: 30,
// Address: "",
// CertPath: "",
// KeyPath: "",
// FBCreds: "",
// }, true, true)
// if err != nil {
// t.Errorf("Failed to create impl: %+v", err)
// t.FailNow()
// }
// impl.Storage = s
// uid := id.NewIdFromString("zezima", id.User, t)
// iid, err := ephemeral.GetIntermediaryId(uid)
// if err != nil {
// t.Errorf("Failed to get intermediary ephemeral id: %+v", err)
// }
// if err != nil {
// t.Errorf("Could not parse precanned time: %v", err.Error())
// }
// u, err := s.AddUser(iid, []byte("trsa"), []byte("Sig"), "token")
// if err != nil {
// t.Errorf("Failed to add user to storage: %+v", err)
// }
// fmt.Println(u.OffsetNum)
// impl.initCreator()
// e, err := s.GetLatestEphemeral()
// if err != nil {
// t.Errorf("Failed to get latest ephemeral: %+v", err)
// }
// if e == nil {
// t.Error("Did not receive ephemeral for user")
// }
//}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment