Update required plugins if available

When plugins are updated, we should update required plugins, too, so
that we do not get errors when new plugins use features not available
in the old versions of required plugins.
This commit is contained in:
René Pfeuffer
2020-07-02 12:08:23 +02:00
parent 3b0693e744
commit e3eb8a99d0
6 changed files with 31 additions and 13 deletions

View File

@@ -21,7 +21,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package sonia.scm.plugin;
import org.mockito.Answers;
@@ -32,10 +32,7 @@ import static org.mockito.Mockito.when;
public class PluginTestHelper {
public static AvailablePlugin createAvailable(String name) {
PluginInformation information = new PluginInformation();
information.setName(name);
information.setVersion("1.0");
return createAvailable(information);
return createAvailable(name, "1.0");
}
public static AvailablePlugin createAvailable(String name, String version) {
@@ -46,9 +43,13 @@ public class PluginTestHelper {
}
public static InstalledPlugin createInstalled(String name) {
return createInstalled(name, "1.0");
}
public static InstalledPlugin createInstalled(String name, String version) {
PluginInformation information = new PluginInformation();
information.setName(name);
information.setVersion("1.0");
information.setVersion(version);
return createInstalled(information);
}