(t *testing.T)
| 11 | ) |
| 12 | |
| 13 | func Test_extractZip(t *testing.T) { |
| 14 | tmpDir := t.TempDir() |
| 15 | extractPath, err := safepaths.ParseAbsolute(filepath.Join(tmpDir, "artifact")) |
| 16 | require.NoError(t, err) |
| 17 | |
| 18 | zipFile, err := zip.OpenReader("./fixtures/myproject.zip") |
| 19 | require.NoError(t, err) |
| 20 | defer zipFile.Close() |
| 21 | |
| 22 | err = ExtractZip(&zipFile.Reader, extractPath) |
| 23 | require.NoError(t, err) |
| 24 | |
| 25 | _, err = os.Stat(filepath.Join(extractPath.String(), "src", "main.go")) |
| 26 | require.NoError(t, err) |
| 27 | } |
nothing calls this directly
no test coverage detected