()
| 172 | } |
| 173 | |
| 174 | func (s *BaseSuite) TemporalFilesystem() (fs billy.Filesystem, clean func()) { |
| 175 | fs = osfs.New(os.TempDir()) |
| 176 | path, err := util.TempDir(fs, "", "") |
| 177 | if err != nil { |
| 178 | panic(err) |
| 179 | } |
| 180 | |
| 181 | fs, err = fs.Chroot(path) |
| 182 | if err != nil { |
| 183 | panic(err) |
| 184 | } |
| 185 | |
| 186 | clean = func() { |
| 187 | _ = util.RemoveAll(fs, path) |
| 188 | } |
| 189 | |
| 190 | return |
| 191 | } |
| 192 | |
| 193 | type SuiteCommon struct{} |
| 194 |
no test coverage detected