Search in sources :

Example 1 with ElasticAgentInformationMigrator

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

the class PluginsInitializerTest method setUp.

@BeforeEach
public void setUp() throws Exception {
    systemEnvironment = mock(SystemEnvironment.class);
    when(systemEnvironment.get(SystemEnvironment.PLUGIN_GO_PROVIDED_PATH)).thenReturn(goPluginsDir.toFile().getAbsolutePath());
    pluginManager = mock(PluginManager.class);
    pluginExtensionsAndVersionValidator = mock(PluginExtensionsAndVersionValidator.class);
    elasticAgentInformationMigrator = mock(ElasticAgentInformationMigrator.class);
    pluginsInitializer = new PluginsInitializer(pluginManager, systemEnvironment, new ZipUtil(), pluginExtensionsAndVersionValidator, elasticAgentInformationMigrator) {

        @Override
        public void startDaemon() {
        }

        @Override
        ZipInputStream getPluginsZipStream() {
            return new ZipInputStream(getClass().getResourceAsStream("/dummy-plugins.zip"));
        }
    };
}
Also used : SystemEnvironment(com.thoughtworks.go.util.SystemEnvironment) PluginManager(com.thoughtworks.go.plugin.infra.PluginManager) ZipInputStream(java.util.zip.ZipInputStream) ZipUtil(com.thoughtworks.go.util.ZipUtil) PluginExtensionsAndVersionValidator(com.thoughtworks.go.plugin.infra.PluginExtensionsAndVersionValidator) ElasticAgentInformationMigrator(com.thoughtworks.go.plugin.infra.ElasticAgentInformationMigrator) BeforeEach(org.junit.jupiter.api.BeforeEach)

Aggregations

ElasticAgentInformationMigrator (com.thoughtworks.go.plugin.infra.ElasticAgentInformationMigrator)1 PluginExtensionsAndVersionValidator (com.thoughtworks.go.plugin.infra.PluginExtensionsAndVersionValidator)1 PluginManager (com.thoughtworks.go.plugin.infra.PluginManager)1 SystemEnvironment (com.thoughtworks.go.util.SystemEnvironment)1 ZipUtil (com.thoughtworks.go.util.ZipUtil)1 ZipInputStream (java.util.zip.ZipInputStream)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1