if err != nil { panic(err) } test_1 = filepath.Join(dir, "..", "..", "..", "fixtures", "plugins", "test_1.exe") test_2 = filepath.Join(dir, "..", "..", "..", "fixtures", "plugins", "test_2.exe") test_with_help = filepath.Join(dir, "..", "..", "..", "fixtures", "plugins", "test_with_help.exe") test_with_push = filepath.Join(dir, "..", "..", "..", "fixtures", "plugins", "test_with_push.exe") test_with_push_short_name = filepath.Join(dir, "..", "..", "..", "fixtures", "plugins", "test_with_push_short_name.exe") rpc.DefaultServer = rpc.NewServer() homeDir, err = ioutil.TempDir(os.TempDir(), "plugins") Expect(err).ToNot(HaveOccurred()) pluginDir = filepath.Join(homeDir, ".cf", "plugins") config.GetPluginPathReturns(pluginDir) curDir, err = os.Getwd() Expect(err).ToNot(HaveOccurred()) pluginFile, err = ioutil.TempFile("./", "test_plugin") Expect(err).ToNot(HaveOccurred()) if runtime.GOOS != "windows" { err = os.Chmod(test_1, 0700) Expect(err).ToNot(HaveOccurred()) } }) AfterEach(func() { os.Remove(filepath.Join(curDir, pluginFile.Name())) os.Remove(homeDir)