diff --git a/acctest/plugin/plugin_acc_test.go b/acctest/plugin/plugin_acc_test.go index ed5ee55e7..b1d1f7d20 100644 --- a/acctest/plugin/plugin_acc_test.go +++ b/acctest/plugin/plugin_acc_test.go @@ -85,6 +85,17 @@ func cleanupPluginInstallation(plugin addrs.Plugin) error { plugin.Hostname, plugin.Namespace, plugin.Type) + + if _, ok := os.LookupEnv("CIRCLECI"); ok { + pluginPath = filepath.Join(home, + ".config", + "packer", + "plugins", + plugin.Hostname, + plugin.Namespace, + plugin.Type) + } + testutils.CleanupFiles(pluginPath) return nil } @@ -99,12 +110,24 @@ func checkPluginInstallation(initOutput string, plugin addrs.Plugin) error { if err != nil { return err } + pluginPath := filepath.Join(home, ".packer.d", "plugins", plugin.Hostname, plugin.Namespace, plugin.Type) + + if _, ok := os.LookupEnv("CIRCLECI"); ok { + pluginPath = filepath.Join(home, + ".config", + "packer", + "plugins", + plugin.Hostname, + plugin.Namespace, + plugin.Type) + } + if !testutils.FileExists(pluginPath) { return fmt.Errorf("%s plugin installation not found", plugin.String()) }