srcDir := copierFixtureSrcDir() dstDir, err := cpCopier.FilteredCopyToTemp(srcDir, []string{ "**/*.stdout.log", "*.stderr.log", "../some.config", "some_directory/**/*", }) Expect(err).ToNot(HaveOccurred()) defer os.RemoveAll(dstDir) tarDirStat, err := os.Stat(dstDir) Expect(err).ToNot(HaveOccurred()) Expect(os.FileMode(0755)).To(Equal(tarDirStat.Mode().Perm())) content, err := fs.ReadFileString(dstDir + "/app.stdout.log") Expect(err).ToNot(HaveOccurred()) assert.Contains(GinkgoT(), content, "this is app stdout") content, err = fs.ReadFileString(dstDir + "/app.stderr.log") Expect(err).ToNot(HaveOccurred()) assert.Contains(GinkgoT(), content, "this is app stderr") content, err = fs.ReadFileString(dstDir + "/other_logs/other_app.stdout.log") Expect(err).ToNot(HaveOccurred()) assert.Contains(GinkgoT(), content, "this is other app stdout") content, err = fs.ReadFileString(dstDir + "/other_logs/more_logs/more.stdout.log") Expect(err).ToNot(HaveOccurred()) assert.Contains(GinkgoT(), content, "this is more stdout")