MCPcopy Create free account
hub / github.com/auth0/auth0-cli / TestUnzip_InvalidFile

Function TestUnzip_InvalidFile

internal/utils/unzip_test.go:86–98  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

84}
85
86func TestUnzip_InvalidFile(t *testing.T) {
87 tmpDir := t.TempDir()
88 invalidZip := filepath.Join(tmpDir, "not_a_zip.txt")
89
90 if err := os.WriteFile(invalidZip, []byte("invalid data"), 0644); err != nil {
91 t.Fatal(err)
92 }
93
94 err := Unzip(invalidZip, tmpDir)
95 if err == nil {
96 t.Fatal("expected error for invalid zip file")
97 }
98}

Callers

nothing calls this directly

Calls 1

UnzipFunction · 0.85

Tested by

no test coverage detected