Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move tests that use the SEM manager into a separate subproject #203

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function gradle_build {
-Dorg.gradle.java.home=${JAVA_HOME} \
-PsourceMaven=https://development.galasa.dev/main/maven-repo/obr ${OPTIONAL_DEBUG_FLAG} \
-PcentralMaven=https://repo.maven.apache.org/maven2/ \
publish publishToMavenLocal \
build publishToMavenLocal \
"

info "Using this command: $cmd"
Expand All @@ -136,29 +136,22 @@ function gradle_build {
success "Built OK"
}

function publish_artifacts {
h2 "Publishing using Maven..."
function build_obr {
h2 "Building OBR using Maven..."
cd ${BASEDIR}/galasa-inttests-parent/dev.galasa.inttests.obr

context=inttests/galasa-inttests-parent/dev.galasa.inttests.obr
bootstrap=https://galasa-ecosystem1.galasa.dev/api/bootstrap

cmd="mvn \
-Dgalasa.source.repo=https://development.galasa.dev/main/maven-repo/obr \
-Dgalasa.central.repo=https://repo.maven.apache.org/maven2/ \
-Dgalasa.release.repo=file://$BASEDIR/temp \
-Dgalasa.bootstrap=${bootstrap} \
-Dgalasa.skip.deploytestcatalog=true \
-Dgalasa.skip.bundletestcatalog=false \
deploy dev.galasa:galasa-maven-plugin:deploytestcat \
install
"

info "Using this command: $cmd"
$cmd 2>&1 >> ${log_file}
rc=$? ; if [[ "${rc}" != "0" ]]; then error "Failed to build ${project} log is at ${log_file}" ; exit 1 ; fi
success "Published to '${bootstrap}' OK"
success "Built ${project} OBR OK"
}

mkdir -p $BASEDIR/temp
gradle_build
publish_artifacts
build_obr
5 changes: 5 additions & 0 deletions galasa-internal-inttests-parent/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Galasa Internal Integration Tests

The integration tests in this subproject depend on an Galasa provisioning manager hosted within IBM to exercise certain managers, including the CICS TS and SDV managers.

As a result, these tests can only be run internally until an open source equivalent of the provisioning manager is created.
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// This section tells gradle which gradle plugins to use to build this project.
plugins {
id 'base'
id 'maven-publish'
id 'dev.galasa.obr' version '0.36.0'
id 'dev.galasa.testcatalog' version '0.36.0'
}

// Set the variables which will control what the built OSGi bundle will be called
// and the name it will be published under in the maven repository.
group = 'dev.galasa'
version = '0.38.0'

// What are the dependencies of the obr ?
dependencies {
bundle project(':dev.galasa.internal.inttests')
}

def testcatalog = file('build/testcatalog.json')
def obrFile = file('build/galasa.obr')

tasks.withType(AbstractPublishToMaven) { task ->
task.dependsOn genobr
task.dependsOn mergetestcat
}

// Tell gradle to publish the built OBR as a maven artifact on the
// local maven repository.
publishing {
publications {
maven(MavenPublication) {
artifact obrFile
artifact (testcatalog) {
classifier "testcatalog"
extension "json"
}
}
}
repositories {
maven {
url "$targetMaven"

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
}
}

// If we are deploying a test catalog using the galasa plugin,
// directly to the ecosystem, then we can get the properties
// we need from the system properties, passed on the command line using
// -DGALASA_STREAM=xxx -DGALASA_BOOTSTRAP=xxx -DGALASA_TOKEN=xxx
deployTestCatalog {
bootstrap = System.getProperty("GALASA_BOOTSTRAP")
stream = System.getProperty("GALASA_STREAM")
token = System.getProperty("GALASA_TOKEN");
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Bundle-Name: dev.galasa.internal.inttests
Import-Package: *
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// This section tells gradle which gradle plugins to use to build this project.
plugins {
id 'java'
id 'maven-publish'
id 'dev.galasa.tests' version '0.36.0'
id 'biz.aQute.bnd.builder' version '6.4.0'
}

// This section tells gradle where it should look for any dependencies
repositories {
mavenLocal()
mavenCentral()
maven {
url "$sourceMaven"
}
maven {
url "$internalMaven"
}

}

// Set the variables which will control what the built OSGi bundle will be called
// and the name it will be published under in the maven repository.
group = 'dev.galasa'
version = '0.38.0'

// What are the dependencies of the test code ?
// When more managers and dependencies are added, this list will need to grow.
dependencies {
implementation platform('dev.galasa:galasa-bom:0.38.0')

implementation 'dev.galasa:dev.galasa'
implementation 'dev.galasa:dev.galasa.framework'
implementation 'dev.galasa:dev.galasa.core.manager'
implementation 'commons-logging:commons-logging'
implementation 'org.assertj:assertj-core'

implementation 'dev.galasa:dev.galasa.galasaecosystem.manager'
implementation 'dev.galasa:dev.galasa.cicsts.manager'
implementation 'dev.galasa:dev.galasa.sdv.manager'
implementation 'dev.galasa:dev.galasa.zosprogram.manager'

implementation 'com.ibm.cics.managers:com.ibm.cics.provisioning.manager:0.0.4'
implementation 'com.google.code.gson:gson:2.10.1'
}

// Tell gradle to publish the built OSGi bundles as maven artifacts on the
// local maven repository.
publishing {
publications {
maven(MavenPublication) {
from components.java
}
}
repositories {
maven {
url "$targetMaven"

if ("$targetMaven".startsWith('http')) {
credentials {
username System.getenv('GITHUB_ACTOR')
password System.getenv('GITHUB_TOKEN')
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci;
package dev.galasa.internal.inttests.ceci;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local;
package dev.galasa.internal.inttests.ceci.local;

import com.ibm.cics.provisioning.annotations.Topology;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
import dev.galasa.linux.ILinuxImage;
import dev.galasa.linux.LinuxImage;
import dev.galasa.linux.OperatingSystem;
import dev.galasa.sem.SemTopology;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;

@SemTopology
@Topology
@Test
@TestAreas({"ceciManager","localecosystem","java11","ubuntu"})
@Tags({"codecoverage"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local.isolated;
package dev.galasa.internal.inttests.ceci.local.isolated;

import com.ibm.cics.provisioning.annotations.Topology;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
import dev.galasa.linux.ILinuxImage;
import dev.galasa.linux.LinuxImage;
import dev.galasa.linux.OperatingSystem;
import dev.galasa.sem.SemTopology;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;

@SemTopology
@Topology
@Test
@TestAreas({"ceciManager","localecosystem","java11","ubuntu","isolated"})
public class CECILocalJava11UbuntuIsolated extends AbstractCECILocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceci.local.mvp;
package dev.galasa.internal.inttests.ceci.local.mvp;

import com.ibm.cics.provisioning.annotations.Topology;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceci.AbstractCECILocal;
import dev.galasa.internal.inttests.ceci.AbstractCECILocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
import dev.galasa.linux.ILinuxImage;
import dev.galasa.linux.LinuxImage;
import dev.galasa.linux.OperatingSystem;
import dev.galasa.sem.SemTopology;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;

@SemTopology
@Topology
// @Test
@TestAreas({"ceciManager","localecosystem","java11","ubuntu","mvp"})
public class CECILocalJava11UbuntuMvp extends AbstractCECILocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda;
package dev.galasa.internal.inttests.ceda;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda.local;
package dev.galasa.internal.inttests.ceda.local;

import com.ibm.cics.provisioning.annotations.Topology;

import dev.galasa.Tags;
import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.inttests.ceda.AbstractCEDALocal;
import dev.galasa.internal.inttests.ceda.AbstractCEDALocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
import dev.galasa.linux.ILinuxImage;
import dev.galasa.linux.LinuxImage;
import dev.galasa.linux.OperatingSystem;
import dev.galasa.sem.SemTopology;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;

@SemTopology
@Topology
@Test
@TestAreas({"cedaManager","localecosystem","java11","ubuntu"})
@Tags({"codecoverage"})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,27 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.ceda.local.isolated;
package dev.galasa.internal.inttests.ceda.local.isolated;

import com.ibm.cics.provisioning.annotations.Topology;

import dev.galasa.Test;
import dev.galasa.TestAreas;
import dev.galasa.galasaecosystem.IGenericEcosystem;
import dev.galasa.galasaecosystem.ILocalEcosystem;
import dev.galasa.galasaecosystem.LocalEcosystem;
import dev.galasa.galasaecosystem.IsolationInstallation;
import dev.galasa.inttests.ceda.AbstractCEDALocal;
import dev.galasa.internal.inttests.ceda.AbstractCEDALocal;
import dev.galasa.java.JavaVersion;
import dev.galasa.java.ubuntu.IJavaUbuntuInstallation;
import dev.galasa.java.ubuntu.JavaUbuntuInstallation;
import dev.galasa.linux.ILinuxImage;
import dev.galasa.linux.LinuxImage;
import dev.galasa.linux.OperatingSystem;
import dev.galasa.sem.SemTopology;
import dev.galasa.zos.IZosImage;
import dev.galasa.zos.ZosImage;

@SemTopology
@Topology
@Test
@TestAreas({"cedaManager","localecosystem","java11","ubuntu","isolated"})
public class CEDALocalJava11UbuntuIsolated extends AbstractCEDALocal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* SPDX-License-Identifier: EPL-2.0
*/
package dev.galasa.inttests.cemt;
package dev.galasa.internal.inttests.cemt;

import static org.assertj.core.api.Assertions.assertThat;

Expand Down
Loading
Loading