-
Notifications
You must be signed in to change notification settings - Fork 2
/
role_test.go
51 lines (40 loc) · 1.2 KB
/
role_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package raiden_test
import (
"testing"
"github.com/sev-2/raiden"
"github.com/stretchr/testify/assert"
)
func TestRoleBase_ConnectionLimit(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, 60, roleBase.ConnectionLimit())
}
func TestRoleBase_InheritRole(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, true, roleBase.InheritRole())
}
func TestRoleBase_CanBypassRls(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, false, roleBase.CanBypassRls())
}
func TestRoleBase_CanCreateDB(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, false, roleBase.CanCreateDB())
}
func TestRoleBase_CanCreateRole(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, false, roleBase.CanCreateRole())
}
func TestRoleBase_CanLogin(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Equal(t, false, roleBase.CanLogin())
}
func TestRoleBase_ValidUntil(t *testing.T) {
roleBase := raiden.RoleBase{}
assert.Nil(t, roleBase.ValidUntil())
}
func TestDefaultRoleValidUntilLayout(t *testing.T) {
assert.Equal(t, "2006-01-02", raiden.DefaultRoleValidUntilLayout)
}
func TestDefaultRoleConnectionLimit(t *testing.T) {
assert.Equal(t, 60, raiden.DefaultRoleConnectionLimit)
}