From a43c225267177e0f92ca42e67ee9dd99b7f66e29 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 7 Dec 2021 13:48:56 -0800 Subject: [PATCH] Cleaning up group functionality after merge --- features/groups/group_functionality.go | 7 +------ features/groups/group_functionality_test.go | 16 ---------------- 2 files changed, 1 insertion(+), 22 deletions(-) diff --git a/features/groups/group_functionality.go b/features/groups/group_functionality.go index d37954d..d74019a 100644 --- a/features/groups/group_functionality.go +++ b/features/groups/group_functionality.go @@ -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} -} \ No newline at end of file +} diff --git a/features/groups/group_functionality_test.go b/features/groups/group_functionality_test.go index 8d9c871..84fa070 100644 --- a/features/groups/group_functionality_test.go +++ b/features/groups/group_functionality_test.go @@ -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{})