Detach integration tests to a separate module
close #282 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
157b31c046
commit
e26a289a3f
|
|
@ -0,0 +1,239 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>parent</artifactId>
|
||||
<groupId>io.jenkins.configuration-as-code</groupId>
|
||||
<version>${revision}${changelist}</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>io.jenkins.configuration-as-code</groupId>
|
||||
<artifactId>integrations</artifactId>
|
||||
|
||||
<name>Configuration as Code Integration tests</name>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>io.jenkins</groupId>
|
||||
<artifactId>configuration-as-code</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.jenkins</groupId>
|
||||
<artifactId>configuration-as-code</artifactId>
|
||||
<version>${project.version}</version>
|
||||
<type>test-jar</type>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.stefanbirkner</groupId>
|
||||
<artifactId>system-rules</artifactId>
|
||||
<version>1.17.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- tested plugins -->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>mailer</artifactId>
|
||||
<version>1.20</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>active-directory</artifactId>
|
||||
<version>2.6</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.jvnet.com4j</groupId>
|
||||
<artifactId>com4j</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>ldap</artifactId>
|
||||
<version>1.16</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>io.jenkins.docker</groupId>
|
||||
<artifactId>docker-plugin</artifactId>
|
||||
<version>1.1.2</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- Upper bounds conflict with the core -->
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.csanchez.jenkins.plugins</groupId>
|
||||
<artifactId>kubernetes</artifactId>
|
||||
<version>1.6.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>github-branch-source</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>com.infradna.tool</groupId>
|
||||
<artifactId>bridge-method-annotation</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>branch-api</artifactId>
|
||||
<version>2.0.16</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>github-oauth</artifactId>
|
||||
<version>0.29</version>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<!-- Provided by the Git plugin -->
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>matrix-project</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>git-client</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>apache-httpcomponents-client-4-api</artifactId>
|
||||
<version>4.5.3-2.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>scm-api</artifactId>
|
||||
<version>2.2.3</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-cps-global-lib</artifactId>
|
||||
<version>2.9</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>role-strategy</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>matrix-auth</artifactId>
|
||||
<version>2.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- required to satisfy upper bound dependencies -->
|
||||
|
||||
<dependency>
|
||||
<groupId>commons-codec</groupId>
|
||||
<artifactId>commons-codec</artifactId>
|
||||
<version>1.9</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-compress</artifactId>
|
||||
<version>1.12</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>structs</artifactId>
|
||||
<version>1.10</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>plain-credentials</artifactId>
|
||||
<version>1.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-api</artifactId>
|
||||
<version>2.23.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-step-api</artifactId>
|
||||
<version>2.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-scm-step</artifactId>
|
||||
<version>2.4</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-support</artifactId>
|
||||
<version>2.16</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-job</artifactId>
|
||||
<version>2.6</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>script-security</artifactId>
|
||||
<version>1.36</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>jackson2-api</artifactId>
|
||||
<version>2.8.11.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>1.21</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
|
|
@ -9,9 +9,7 @@ import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
|||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertArrayEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
|
|
@ -35,7 +33,7 @@ public class DockerCloudTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@ConfiguredWithCode("DockerCloudTest/update_docker_cloud/DockerCloudTest1.yml")
|
||||
@ConfiguredWithCode("DockerCloudTest1.yml")
|
||||
public void update_docker_cloud() throws Exception {
|
||||
DockerCloud docker = DockerCloud.getCloudByName("docker");
|
||||
assertNotNull(docker);
|
||||
|
|
@ -47,7 +45,7 @@ public class DockerCloudTest {
|
|||
checkTemplate(template, "docker-agent", "jenkins", "/home/jenkins/agent", "10",
|
||||
new String[] { "hello:/hello", "world:/world"}, "hello=world\nfoo=bar");
|
||||
|
||||
ConfigurationAsCode.get().configure(getClass().getResource("DockerCloudTest/update_docker_cloud/DockerCloudTest2.yml").toExternalForm());
|
||||
ConfigurationAsCode.get().configure(getClass().getResource("DockerCloudTest2.yml").toExternalForm());
|
||||
|
||||
docker = DockerCloud.getCloudByName("docker");
|
||||
assertNotNull(docker);
|
||||
|
|
@ -8,9 +8,7 @@ import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
|||
import org.jenkinsci.plugins.github_branch_source.GitHubSCMNavigator;
|
||||
import org.junit.Rule;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package org.jenkinsci.plugins.casc.integrations.globalmatrixauth;
|
||||
package org.jenkinsci.plugins.casc;
|
||||
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import hudson.security.GlobalMatrixAuthorizationStrategy;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.jenkinsci.plugins.casc.Configurator;
|
||||
import org.jenkinsci.plugins.casc.integrations.globalmatrixauth.GlobalMatrixAuthorizationStrategyConfigurator;
|
||||
import org.jenkinsci.plugins.casc.misc.ConfiguredWithCode;
|
||||
import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
||||
import org.junit.Rule;
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package org.jenkinsci.plugins.casc.misc;
|
||||
package org.jenkinsci.plugins.casc;
|
||||
|
||||
import hudson.model.User;
|
||||
import hudson.security.ACL;
|
||||
|
|
@ -27,8 +27,8 @@ import hudson.security.ACLContext;
|
|||
import hudson.security.AccessControlled;
|
||||
import hudson.security.Permission;
|
||||
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
/**
|
||||
* Provides asserts for {@link hudson.security.Permission} checks.
|
||||
|
|
@ -1,9 +1,8 @@
|
|||
package org.jenkinsci.plugins.casc.integrations.projectmatrixauth;
|
||||
package org.jenkinsci.plugins.casc;
|
||||
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import hudson.security.ProjectMatrixAuthorizationStrategy;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.jenkinsci.plugins.casc.Configurator;
|
||||
import org.jenkinsci.plugins.casc.integrations.projectmatriaxauth.ProjectMatrixAuthorizationStrategyConfigurator;
|
||||
import org.jenkinsci.plugins.casc.misc.ConfiguredWithCode;
|
||||
import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.jenkinsci.plugins.casc.integrations.rolebasedauth;
|
||||
package org.jenkinsci.plugins.casc;
|
||||
|
||||
import com.cloudbees.hudson.plugins.folder.Folder;
|
||||
import com.michelin.cio.hudson.plugins.rolestrategy.Role;
|
||||
|
|
@ -9,10 +9,9 @@ import hudson.model.Item;
|
|||
import hudson.model.User;
|
||||
import hudson.security.AuthorizationStrategy;
|
||||
import jenkins.model.Jenkins;
|
||||
import org.jenkinsci.plugins.casc.Configurator;
|
||||
import org.jenkinsci.plugins.casc.integrations.rolebasedauth.RoleBasedAuthorizationStrategyConfigurator;
|
||||
import org.jenkinsci.plugins.casc.misc.ConfiguredWithCode;
|
||||
import org.jenkinsci.plugins.casc.misc.JenkinsConfiguredWithCodeRule;
|
||||
import static org.jenkinsci.plugins.casc.misc.PermissionAssert.*;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.jvnet.hudson.test.Issue;
|
||||
|
|
@ -22,9 +21,9 @@ import java.util.Set;
|
|||
|
||||
import static org.hamcrest.CoreMatchers.equalTo;
|
||||
import static org.hamcrest.CoreMatchers.instanceOf;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertThat;
|
||||
import static org.jenkinsci.plugins.casc.PermissionAssert.assertHasNoPermission;
|
||||
import static org.jenkinsci.plugins.casc.PermissionAssert.assertHasPermission;
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
/**
|
||||
* @author Oleg Nenashev
|
||||
|
|
@ -0,0 +1,160 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>io.jenkins.configuration-as-code</groupId>
|
||||
<artifactId>parent</artifactId>
|
||||
<version>${revision}${changelist}</version>
|
||||
<relativePath>..</relativePath>
|
||||
</parent>
|
||||
<groupId>io.jenkins</groupId>
|
||||
<artifactId>configuration-as-code</artifactId>
|
||||
<version>${revision}${changelist}</version>
|
||||
<packaging>hpi</packaging>
|
||||
|
||||
<name>Configuration as Code Plugin</name>
|
||||
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.yaml</groupId>
|
||||
<artifactId>snakeyaml</artifactId>
|
||||
<version>1.18</version>
|
||||
</dependency>
|
||||
|
||||
<!-- plugin adapters-->
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>credentials</artifactId>
|
||||
<version>2.1.16</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>job-dsl</artifactId>
|
||||
<version>1.66</version>
|
||||
<optional>true</optional>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>org.codehaus.groovy</groupId>
|
||||
<artifactId>groovy-all</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>role-strategy</artifactId>
|
||||
<version>2.7.0</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>matrix-auth</artifactId>
|
||||
<version>2.2</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>cloudbees-folder</artifactId>
|
||||
<version>6.1.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>ssh-credentials</artifactId>
|
||||
<version>1.13</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins.workflow</groupId>
|
||||
<artifactId>workflow-multibranch</artifactId>
|
||||
<version>2.9.2</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.github.stefanbirkner</groupId>
|
||||
<artifactId>system-rules</artifactId>
|
||||
<version>1.17.1</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!--TODO: This should be in a seperate plugin at some point -->
|
||||
<dependency>
|
||||
<groupId>com.bettercloud</groupId>
|
||||
<artifactId>vault-java-driver</artifactId>
|
||||
<version>3.0.0</version>
|
||||
</dependency>
|
||||
|
||||
<!-- Used by Essentials -->
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>metrics</artifactId>
|
||||
<version>3.1.2.12</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jenkins-ci.plugins</groupId>
|
||||
<artifactId>structs</artifactId>
|
||||
<version>1.7</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>test-jar</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<excludes>
|
||||
<exclude>test-dependencies/index</exclude>
|
||||
</excludes>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<configuration>
|
||||
<failOnError>false</failOnError>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-enforcer-plugin</artifactId>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>display-info</id>
|
||||
<configuration>
|
||||
<rules>
|
||||
<requireUpperBoundDeps>
|
||||
<excludes combine.children="append">
|
||||
<!-- Safe, https://github.com/jenkinsci/active-directory-plugin/pull/84 -->
|
||||
<exclude>org.jvnet.com4j:com4j</exclude>
|
||||
<!-- Docker Java API Plugin issues, https://issues.jenkins-ci.org/browse/JENKINS-49369 -->
|
||||
<exclude>org.apache.commons:commons-compress</exclude>
|
||||
</excludes>
|
||||
</requireUpperBoundDeps>
|
||||
</rules>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
||||
|
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.4 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue