mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-19 08:46:38 +00:00
[misc] Move shared components to shared directory (#4286)
Moved the following directories: ``` - management/client → shared/management/client - management/domain → shared/management/domain - management/proto → shared/management/proto - signal/client → shared/signal/client - signal/proto → shared/signal/proto - relay/client → shared/relay/client - relay/auth → shared/relay/auth ``` and adjusted import paths
This commit is contained in:
49
shared/management/domain/list_test.go
Normal file
49
shared/management/domain/list_test.go
Normal file
@@ -0,0 +1,49 @@
|
||||
package domain
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
)
|
||||
|
||||
func Test_EqualReturnsTrueForIdenticalLists(t *testing.T) {
|
||||
list1 := List{"domain1", "domain2", "domain3"}
|
||||
list2 := List{"domain1", "domain2", "domain3"}
|
||||
|
||||
assert.True(t, list1.Equal(list2))
|
||||
}
|
||||
|
||||
func Test_EqualReturnsFalseForDifferentLengths(t *testing.T) {
|
||||
list1 := List{"domain1", "domain2"}
|
||||
list2 := List{"domain1", "domain2", "domain3"}
|
||||
|
||||
assert.False(t, list1.Equal(list2))
|
||||
}
|
||||
|
||||
func Test_EqualReturnsFalseForDifferentElements(t *testing.T) {
|
||||
list1 := List{"domain1", "domain2", "domain3"}
|
||||
list2 := List{"domain1", "domain4", "domain3"}
|
||||
|
||||
assert.False(t, list1.Equal(list2))
|
||||
}
|
||||
|
||||
func Test_EqualReturnsTrueForUnsortedIdenticalLists(t *testing.T) {
|
||||
list1 := List{"domain3", "domain1", "domain2"}
|
||||
list2 := List{"domain1", "domain2", "domain3"}
|
||||
|
||||
assert.True(t, list1.Equal(list2))
|
||||
}
|
||||
|
||||
func Test_EqualReturnsFalseForEmptyAndNonEmptyList(t *testing.T) {
|
||||
list1 := List{}
|
||||
list2 := List{"domain1"}
|
||||
|
||||
assert.False(t, list1.Equal(list2))
|
||||
}
|
||||
|
||||
func Test_EqualReturnsTrueForBothEmptyLists(t *testing.T) {
|
||||
list1 := List{}
|
||||
list2 := List{}
|
||||
|
||||
assert.True(t, list1.Equal(list2))
|
||||
}
|
||||
Reference in New Issue
Block a user