Search in sources :

Example 1 with ElasticAgentExtensionV1

use of com.thoughtworks.go.plugin.access.elastic.v1.ElasticAgentExtensionV1 in project gocd by gocd.

the class ElasticAgentExtensionV1Test method setUp.

@Before
public void setUp() throws Exception {
    initMocks(this);
    requestArgumentCaptor = ArgumentCaptor.forClass(GoPluginApiRequest.class);
    final List<String> goSupportedVersions = Arrays.asList("1.0", "2.0", "3.0");
    when(descriptor.id()).thenReturn(PLUGIN_ID);
    when(pluginManager.getPluginDescriptorFor(PLUGIN_ID)).thenReturn(descriptor);
    when(pluginManager.isPluginOfType(ELASTIC_AGENT_EXTENSION, PLUGIN_ID)).thenReturn(true);
    when(pluginManager.resolveExtensionVersion(PLUGIN_ID, ELASTIC_AGENT_EXTENSION, goSupportedVersions)).thenReturn("1.0");
    final PluginRequestHelper pluginRequestHelper = new PluginRequestHelper(pluginManager, goSupportedVersions, ELASTIC_AGENT_EXTENSION);
    extensionV1 = new ElasticAgentExtensionV1(pluginRequestHelper);
}
Also used : ElasticAgentExtensionV1(com.thoughtworks.go.plugin.access.elastic.v1.ElasticAgentExtensionV1) GoPluginApiRequest(com.thoughtworks.go.plugin.api.request.GoPluginApiRequest) PluginRequestHelper(com.thoughtworks.go.plugin.access.PluginRequestHelper) Before(org.junit.Before)

Aggregations

PluginRequestHelper (com.thoughtworks.go.plugin.access.PluginRequestHelper)1 ElasticAgentExtensionV1 (com.thoughtworks.go.plugin.access.elastic.v1.ElasticAgentExtensionV1)1 GoPluginApiRequest (com.thoughtworks.go.plugin.api.request.GoPluginApiRequest)1 Before (org.junit.Before)1