Search in sources :

Example 1 with PluginLoader

use of com.thoughtworks.go.plugin.infra.PluginLoader in project gocd by gocd.

the class DefaultPluginJarChangeListenerTest method setUp.

@BeforeEach
void setUp(@TempDir File rootDir) {
    temporaryFolder = new FileHelper(rootDir);
    bundleDir = temporaryFolder.newFolder("bundleDir");
    pluginWorkDir = temporaryFolder.newFolder("pluginDir");
    registry = mock(DefaultPluginRegistry.class);
    osgiManifestGenerator = mock(GoPluginOSGiManifest.DefaultGoPluginOSGiManifestCreator.class);
    pluginLoader = mock(PluginLoader.class);
    goPluginBundleDescriptorBuilder = mock(GoPluginBundleDescriptorBuilder.class);
    systemEnvironment = mock(SystemEnvironment.class);
    when(systemEnvironment.get(PLUGIN_ACTIVATOR_JAR_PATH)).thenReturn("defaultFiles/go-plugin-activator.jar");
    when(systemEnvironment.get(PLUGIN_WORK_DIR)).thenReturn(bundleDir.getAbsolutePath());
    when(systemEnvironment.getOperatingSystemFamilyName()).thenReturn("Linux");
    listener = new DefaultPluginJarChangeListener(registry, osgiManifestGenerator, pluginLoader, goPluginBundleDescriptorBuilder, systemEnvironment);
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) FileHelper(com.thoughtworks.go.plugin.FileHelper) PluginLoader(com.thoughtworks.go.plugin.infra.PluginLoader) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

FileHelper (com.thoughtworks.go.plugin.FileHelper)1 PluginLoader (com.thoughtworks.go.plugin.infra.PluginLoader)1 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1