MCPcopy
hub / github.com/lima-vm/lima / TestGetDefaultBlockList

Function TestGetDefaultBlockList

pkg/envutil/envutil_test.go:196–210  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

194}
195
196func TestGetDefaultBlockList(t *testing.T) {
197 blocklist := GetDefaultBlockList()
198
199 if &blocklist[0] == &defaultBlockList[0] {
200 t.Error("GetDefaultBlockList should return a copy, not the original slice")
201 }
202
203 assert.DeepEqual(t, blocklist, defaultBlockList)
204
205 expectedItems := []string{"PATH", "HOME", "SSH_*", "USER"}
206 for _, item := range expectedItems {
207 found := slices.Contains(blocklist, item)
208 assert.Assert(t, found, "Expected builtin blocklist to contain %#q", item)
209 }
210}
211
212func TestValidatePattern(t *testing.T) {
213 tests := []struct {

Callers

nothing calls this directly

Calls 2

GetDefaultBlockListFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected