@@ -88,9 +88,11 @@ func TestGetBlockAndAllowLists(t *testing.T) {
8888 t .Setenv ("LIMA_SHELLENV_BLOCK" , "" )
8989 t .Setenv ("LIMA_SHELLENV_ALLOW" , "" )
9090
91- blockList := getBlockList ()
92- allowList := getAllowList ()
91+ blockList , isBlockListSet := getBlockList ()
92+ allowList , isAllowListSet := getAllowList ()
9393
94+ assert .Assert (t , ! isBlockListSet )
95+ assert .Assert (t , ! isAllowListSet )
9496 assert .Assert (t , isUsingDefaultBlockList ())
9597 assert .DeepEqual (t , blockList , defaultBlockList )
9698 assert .Equal (t , len (allowList ), 0 )
@@ -99,7 +101,8 @@ func TestGetBlockAndAllowLists(t *testing.T) {
99101 t .Run ("custom blocklist" , func (t * testing.T ) {
100102 t .Setenv ("LIMA_SHELLENV_BLOCK" , "PATH,HOME" )
101103
102- blockList := getBlockList ()
104+ blockList , isSet := getBlockList ()
105+ assert .Assert (t , isSet )
103106 assert .Assert (t , ! isUsingDefaultBlockList ())
104107 expected := []string {"PATH" , "HOME" }
105108 assert .DeepEqual (t , blockList , expected )
@@ -108,7 +111,8 @@ func TestGetBlockAndAllowLists(t *testing.T) {
108111 t .Run ("additive blocklist" , func (t * testing.T ) {
109112 t .Setenv ("LIMA_SHELLENV_BLOCK" , "+CUSTOM_VAR" )
110113
111- blockList := getBlockList ()
114+ blockList , isSet := getBlockList ()
115+ assert .Assert (t , isSet )
112116 assert .Assert (t , isUsingDefaultBlockList ())
113117 expected := slices .Concat (GetDefaultBlockList (), []string {"CUSTOM_VAR" })
114118 assert .DeepEqual (t , blockList , expected )
@@ -117,7 +121,8 @@ func TestGetBlockAndAllowLists(t *testing.T) {
117121 t .Run ("allowlist" , func (t * testing.T ) {
118122 t .Setenv ("LIMA_SHELLENV_ALLOW" , "FOO,BAR" )
119123
120- allowList := getAllowList ()
124+ allowList , isSet := getAllowList ()
125+ assert .Assert (t , isSet )
121126 expected := []string {"FOO" , "BAR" }
122127 assert .DeepEqual (t , allowList , expected )
123128 })
0 commit comments