@@ -10,32 +10,32 @@ import (
1010 "github.com/stretchr/testify/require"
1111)
1212
13- func TestVerifyAllowlistConfig (t * testing.T ) {
13+ func TestVerifyAllowlistAllowList (t * testing.T ) {
1414 admins := []common.Address {{1 }}
1515 enableds := []common.Address {{2 }}
1616 tests := []struct {
1717 name string
18- config Config
18+ config AllowListConfig
1919 expectedError string
2020 }{
2121 {
2222 name : "invalid allow list config in allowlist" ,
23- config : Config {admins , admins },
23+ config : AllowListConfig {admins , admins },
2424 expectedError : "cannot set address" ,
2525 },
2626 {
2727 name : "nil member allow list config in allowlist" ,
28- config : Config {nil , nil },
28+ config : AllowListConfig {nil , nil },
2929 expectedError : "" ,
3030 },
3131 {
3232 name : "empty member allow list config in allowlist" ,
33- config : Config {[]common.Address {}, []common.Address {}},
33+ config : AllowListConfig {[]common.Address {}, []common.Address {}},
3434 expectedError : "" ,
3535 },
3636 {
3737 name : "valid allow list config in allowlist" ,
38- config : Config {admins , enableds },
38+ config : AllowListConfig {admins , enableds },
3939 expectedError : "" ,
4040 },
4141 }
@@ -53,37 +53,37 @@ func TestVerifyAllowlistConfig(t *testing.T) {
5353 }
5454}
5555
56- func TestEqualAllowListConfig (t * testing.T ) {
56+ func TestEqualAllowListAllowList (t * testing.T ) {
5757 admins := []common.Address {{1 }}
5858 enableds := []common.Address {{2 }}
5959 tests := []struct {
6060 name string
61- config * Config
62- other * Config
61+ config * AllowListConfig
62+ other * AllowListConfig
6363 expected bool
6464 }{
6565 {
6666 name : "non-nil config and nil other" ,
67- config : & Config {admins , enableds },
67+ config : & AllowListConfig {admins , enableds },
6868 other : nil ,
6969 expected : false ,
7070 },
7171 {
7272 name : "different admin" ,
73- config : & Config {admins , enableds },
74- other : & Config {[]common.Address {{3 }}, enableds },
73+ config : & AllowListConfig {admins , enableds },
74+ other : & AllowListConfig {[]common.Address {{3 }}, enableds },
7575 expected : false ,
7676 },
7777 {
7878 name : "different enabled" ,
79- config : & Config {admins , enableds },
80- other : & Config {admins , []common.Address {{3 }}},
79+ config : & AllowListConfig {admins , enableds },
80+ other : & AllowListConfig {admins , []common.Address {{3 }}},
8181 expected : false ,
8282 },
8383 {
8484 name : "same config" ,
85- config : & Config {admins , enableds },
86- other : & Config {admins , enableds },
85+ config : & AllowListConfig {admins , enableds },
86+ other : & AllowListConfig {admins , enableds },
8787 expected : true ,
8888 },
8989 }
0 commit comments