BREAKING CHANGE.
authorEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 21 Jul 2011 15:07:47 +0000 (19:07 +0400)
committerEugene Petrenko <eugene.petrenko@gmail.com>
Thu, 21 Jul 2011 15:07:47 +0000 (19:07 +0400)
I have to change run type for my runner because the name is too long to fit wired database settins. You need to recreate build runner or replace 'jetbrains.nuget.packagesInstaller' run-type attribute values with 'jb.nuget.installer' in your project.xml files to make have your configured build runner available.

nuget-common/src/jetbrains/buildServer/nuget/common/PackagesConstants.java
nuget-tests/src/jetbrains/buildServer/nuget/tests/RunTypeNameTest.java [new file with mode: 0644]
nuget-tests/src/testng-nuget-tests..xml

index 29b929fb2dc8e6940a6b4c5eb407ebafce9a00be..3c77d898e81d650f553c52b9bc282511e6041829 100644 (file)
@@ -23,7 +23,7 @@ import jetbrains.buildServer.ArtifactsConstants;
  * Date: 07.07.11 13:56\r
  */\r
 public interface PackagesConstants {\r
-  public static final String RUN_TYPE = "jetbrains.nuget.packagesInstaller";\r
+  public static final String RUN_TYPE = "jb.nuget.installer"; //no more than 30 chars\r
 \r
 \r
   public static final String NUGET_PATH = "nuget.path";\r
diff --git a/nuget-tests/src/jetbrains/buildServer/nuget/tests/RunTypeNameTest.java b/nuget-tests/src/jetbrains/buildServer/nuget/tests/RunTypeNameTest.java
new file mode 100644 (file)
index 0000000..b89d109
--- /dev/null
@@ -0,0 +1,48 @@
+/*\r
+ * Copyright 2000-2011 JetBrains s.r.o.\r
+ *\r
+ * Licensed under the Apache License, Version 2.0 (the "License");\r
+ * you may not use this file except in compliance with the License.\r
+ * You may obtain a copy of the License at\r
+ *\r
+ * http://www.apache.org/licenses/LICENSE-2.0\r
+ *\r
+ * Unless required by applicable law or agreed to in writing, software\r
+ * distributed under the License is distributed on an "AS IS" BASIS,\r
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
+ * See the License for the specific language governing permissions and\r
+ * limitations under the License.\r
+ */\r
+\r
+package jetbrains.buildServer.nuget.tests;\r
+\r
+import jetbrains.buildServer.BaseTestCase;\r
+import jetbrains.buildServer.nuget.server.install.PackagesInstallerRunType;\r
+import jetbrains.buildServer.web.openapi.PluginDescriptor;\r
+import org.jmock.Mockery;\r
+import org.testng.Assert;\r
+import org.testng.annotations.BeforeMethod;\r
+import org.testng.annotations.Test;\r
+\r
+/**\r
+ * Created by Eugene Petrenko (eugene.petrenko@gmail.com)\r
+ * Date: 21.07.11 19:03\r
+ */\r
+public class RunTypeNameTest extends BaseTestCase {\r
+  private Mockery m;\r
+  private PluginDescriptor descr;\r
+\r
+  @BeforeMethod\r
+  @Override\r
+  protected void setUp() throws Exception {\r
+    super.setUp();\r
+    m = new Mockery();\r
+    descr = m.mock(PluginDescriptor.class);\r
+  }\r
+\r
+  @Test\r
+  public void test_installPackagesRunTypeIdLendth() {\r
+    final String type = new PackagesInstallerRunType(descr).getType();\r
+    Assert.assertTrue(type.length() < 30);\r
+  }\r
+}\r
index 866a2b0ee6f12c19e93d8a9cd09ef1b67d5f329e..ae950b433f623b5ed38684d54da68a838ac0f1e8 100644 (file)
@@ -3,6 +3,8 @@
 \r
   <test name="fast tests">\r
     <classes>\r
+      <class name="jetbrains.buildServer.nuget.tests.RunTypeNameTest"/>\r
+\r
       <class name="jetbrains.buildServer.nuget.tests.agent.NuGetPackagesConfigParserTest"/>\r
       <class name="jetbrains.buildServer.nuget.tests.agent.PackagesWatcherTest"/>\r
       <class name="jetbrains.buildServer.nuget.tests.agent.LocateNuGetConfigBuildProcessTest"/>\r