add back passwrod errors for use; staticcheck fixes
This commit is contained in:
parent
ac05caf009
commit
113a6b617a
|
@ -122,6 +122,12 @@ const (
|
|||
// Password, NewPassword
|
||||
ChangePassword = Type("ChangePassword")
|
||||
|
||||
// Error(err), EventID
|
||||
ChangePasswordError = Type("ChangePasswordError")
|
||||
|
||||
// EventID
|
||||
ChangePasswordSuccess = Type("ChangePasswordSuccess")
|
||||
|
||||
// a group has been successfully added or newly created
|
||||
// attributes:
|
||||
// Data [serialized *model.Group]
|
||||
|
|
|
@ -622,9 +622,8 @@ func (e *engine) handlePeerRetVal(hostname string, getValData, retValData []byte
|
|||
// REQUIREMENTS: must be called inside a block with e.ephemeralServicesLock.Lock()
|
||||
// can't do it iself because is called from inside peerWithTokenServer which holds the lock
|
||||
func (e *engine) leaveServer(server string) {
|
||||
es, ok := e.ephemeralServices[server]
|
||||
ephemeralService, ok := e.ephemeralServices[server]
|
||||
if ok {
|
||||
ephemeralService := es.(tapir.Service)
|
||||
ephemeralService.Shutdown()
|
||||
delete(e.ephemeralServices, server)
|
||||
}
|
||||
|
|
|
@ -274,12 +274,6 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
|
||||
numGoRoutinesPostCarolConnect := runtime.NumGoroutine()
|
||||
|
||||
messages, err := alice.GetMostRecentMessages(aliceGroupConversationID, 0, 0, 20)
|
||||
log.Infof("Alice messages")
|
||||
for i, msg := range messages {
|
||||
log.Infof("alice message %v: %v", i, msg)
|
||||
}
|
||||
|
||||
// Check Alice Timeline
|
||||
checkMessage(t, alice, aliceGroupConversationID, 1, aliceLines[0])
|
||||
checkMessage(t, alice, aliceGroupConversationID, 2, bobLines[0])
|
||||
|
@ -295,11 +289,6 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
checkSendMessageToGroup(t, bob, bobGroupConversationID, bobLines[2])
|
||||
time.Sleep(time.Second * 30)
|
||||
|
||||
messages, err = bob.GetMostRecentMessages(aliceGroupConversationID, 0, 0, 20)
|
||||
log.Infof("Bob messages")
|
||||
for i, msg := range messages {
|
||||
log.Infof("bob message %v: %v", i, msg)
|
||||
}
|
||||
// Check Bob Timeline
|
||||
checkMessage(t, bob, bobGroupConversationID, 1, aliceLines[0])
|
||||
checkMessage(t, bob, bobGroupConversationID, 2, bobLines[0])
|
||||
|
@ -309,11 +298,6 @@ func TestCwtchPeerIntegration(t *testing.T) {
|
|||
checkMessage(t, bob, bobGroupConversationID, 6, bobLines[2])
|
||||
|
||||
// Check Carol Timeline
|
||||
messages, err = carol.GetMostRecentMessages(aliceGroupConversationID, 0, 0, 20)
|
||||
log.Infof("Carol messages")
|
||||
for i, msg := range messages {
|
||||
log.Infof("carol message %v: %v", i, msg)
|
||||
}
|
||||
checkMessage(t, carol, carolGroupConversationID, 1, aliceLines[0])
|
||||
checkMessage(t, carol, carolGroupConversationID, 2, bobLines[0])
|
||||
checkMessage(t, carol, carolGroupConversationID, 3, aliceLines[1])
|
||||
|
|
Loading…
Reference in New Issue