mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 15:35:49 +01:00
introduce scm version to be sure the plugin is for the correct scm-manager major version
This commit is contained in:
@@ -71,7 +71,7 @@ public class PluginTreeTest
|
||||
{
|
||||
PluginCondition condition = new PluginCondition("999",
|
||||
new ArrayList<String>(), "hit");
|
||||
Plugin plugin = new Plugin(createInfo("a", "b", "1"), null, condition,
|
||||
Plugin plugin = new Plugin(2, createInfo("a", "b", "1"), null, condition,
|
||||
false, null);
|
||||
ExplodedSmp smp = createSmp(plugin);
|
||||
|
||||
@@ -105,6 +105,22 @@ public class PluginTreeTest
|
||||
assertThat(nodes, containsInAnyOrder("a:a", "b:b", "c:c"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
*
|
||||
* @throws IOException
|
||||
*/
|
||||
@Test(expected = PluginException.class)
|
||||
public void testScmVersion() throws IOException
|
||||
{
|
||||
Plugin plugin = new Plugin(1, createInfo("a", "b", "1"), null, null, false,
|
||||
null);
|
||||
ExplodedSmp smp = createSmp(plugin);
|
||||
|
||||
new PluginTree(smp).getRootNodes();
|
||||
}
|
||||
|
||||
/**
|
||||
* Method description
|
||||
*
|
||||
@@ -185,7 +201,7 @@ public class PluginTreeTest
|
||||
*/
|
||||
private ExplodedSmp createSmp(String name) throws IOException
|
||||
{
|
||||
return createSmp(new Plugin(createInfo(name, name, "1.0.0"), null, null,
|
||||
return createSmp(new Plugin(2, createInfo(name, name, "1.0.0"), null, null,
|
||||
false, null));
|
||||
}
|
||||
|
||||
@@ -211,7 +227,7 @@ public class PluginTreeTest
|
||||
dependencySet.add(d.concat(":").concat(d));
|
||||
}
|
||||
|
||||
Plugin plugin = new Plugin(createInfo(name, name, "1"), null, null,
|
||||
Plugin plugin = new Plugin(2, createInfo(name, name, "1"), null, null,
|
||||
false, dependencySet);
|
||||
|
||||
return createSmp(plugin);
|
||||
|
||||
Reference in New Issue
Block a user