Cleaning up group functionality after merge
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
8e80dbaf78
commit
a43c225267
|
@ -9,13 +9,8 @@ import (
|
|||
"fmt"
|
||||
)
|
||||
|
||||
const serverPrefix = "server:"
|
||||
const tofuBundlePrefix = "tofubundle:"
|
||||
const groupPrefix = "torv3"
|
||||
const groupExperiment = "tapir-groups-experiment"
|
||||
|
||||
const importBundlePrefix = "importBundle"
|
||||
|
||||
const (
|
||||
// ServerList is a json encoded list of servers
|
||||
ServerList = event.Field("ServerList")
|
||||
|
@ -60,4 +55,4 @@ func (gf *GroupFunctionality) GetServerInfo(serverOnion string, profile peer.Cwt
|
|||
}
|
||||
}
|
||||
return Server{Onion: serverOnion, Status: connections.ConnectionStateName[profile.GetPeerState(serverInfo.Handle)], Keys: serverKeys}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,22 +2,6 @@ package groups
|
|||
|
||||
import "testing"
|
||||
|
||||
func TestGroupFunctionality_ValidPrefix(t *testing.T) {
|
||||
gf, _ := ExperimentGate(map[string]bool{groupExperiment: true})
|
||||
if gf.ValidPrefix("torv3blahblahblah") == false {
|
||||
t.Fatalf("torv3 should be a valid prefix")
|
||||
}
|
||||
if gf.ValidPrefix("tofubundle:32432423||3242342") == false {
|
||||
t.Fatalf("tofubundle should be a valid prefix")
|
||||
}
|
||||
if gf.ValidPrefix("server:23541233t") == false {
|
||||
t.Fatalf("server should be a valid prefix")
|
||||
}
|
||||
if gf.ValidPrefix("alice!24234") == true {
|
||||
t.Fatalf("alice should be an invalid predix")
|
||||
}
|
||||
}
|
||||
|
||||
func TestGroupFunctionality_IsEnabled(t *testing.T) {
|
||||
|
||||
_, err := ExperimentGate(map[string]bool{})
|
||||
|
|
Reference in New Issue