Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
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
110 changes: 81 additions & 29 deletions acs-integration-tests/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2016 General Electric Company.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Copyright 2016 General Electric Company.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

Expand Down Expand Up @@ -53,7 +53,7 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- All tests in this project are run using failsafe.
<!-- All tests in this project are run using failsafe.
Skip test phase -->
<skip>true</skip>
</configuration>
Expand Down Expand Up @@ -125,7 +125,7 @@
<groupId>org.springframework.security.oauth</groupId>
<artifactId>spring-security-oauth2</artifactId>
<version>2.0.3.RELEASE</version><!--$NO-MVN-MAN-VER$-->
<!-- These transitive dependencies are incompatible with spring
<!-- These transitive dependencies are incompatible with spring
core dependencies pulled in by spring boot -->
<exclusions>
<exclusion>
Expand Down Expand Up @@ -198,7 +198,7 @@

<profiles>
<profile>
<id>cloud</id>
<id>predix-cloud</id>
<build>
<plugins>
<plugin>
Expand All @@ -210,8 +210,8 @@
<parallel>false</parallel>
<!-- us32088: Place test reports outside of target directory so reports are not removed by 'mvn clean'
and retained by Jenkins for each profile -->
<reportsDirectory>${basedir}/failsafe-reports-cloud</reportsDirectory>
<summaryFile>${basedir}/failsafe-reports-cloud/failsafe-summary.xml</summaryFile>
<reportsDirectory>${basedir}/failsafe-reports-predix-cloud</reportsDirectory>
<summaryFile>${basedir}/failsafe-reports-predix-cloud/failsafe-summary.xml</summaryFile>
<systemPropertyVariables>
<ACS_CF_DOMAIN>${acs.cf.domain}</ACS_CF_DOMAIN>
<ACS_DEFAULT_ISSUER_ID>${ACS_DEFAULT_ISSUER_ID}</ACS_DEFAULT_ISSUER_ID>
Expand Down Expand Up @@ -242,7 +242,6 @@
<excludes>
<exclude>**/ACSPerformanceIT.java</exclude>
<exclude>**/PolicyEvalCachingWithGraphDBIT.java</exclude>
<exclude>**/Hierarchical*IT.java</exclude>
</excludes>
<includes>
<include>**/*IT.java</include>
Expand Down Expand Up @@ -366,7 +365,7 @@
</profile>

<profile>
<id>cloud-titan</id>
<id>predix-cloud-titan</id>
<build>
<plugins>
<plugin>
Expand All @@ -378,8 +377,8 @@
<parallel>false</parallel>
<!-- us32088: Place test reports outside of target directory so reports are not removed by 'mvn clean'
and retained by Jenkins for each profile -->
<reportsDirectory>${basedir}/failsafe-reports-cloud-titan</reportsDirectory>
<summaryFile>${basedir}/failsafe-reports-cloud-titan/failsafe-summary.xml</summaryFile>
<reportsDirectory>${basedir}/failsafe-reports-predix-cloud-titan</reportsDirectory>
<summaryFile>${basedir}/failsafe-reports-predix-cloud-titan/failsafe-summary.xml</summaryFile>
<systemPropertyVariables>
<ACS_CF_DOMAIN>${acs.cf.domain}</ACS_CF_DOMAIN>
<ACS_DEFAULT_ISSUER_ID>${ACS_DEFAULT_ISSUER_ID}</ACS_DEFAULT_ISSUER_ID>
Expand Down Expand Up @@ -409,7 +408,6 @@
</systemPropertyVariables>
<excludes>
<exclude>**/ACSPerformanceIT.java</exclude>
<exclude>**/NonHierarchical*IT.java</exclude>
</excludes>
<includes>
<include>**/*IT.java</include>
Expand Down Expand Up @@ -536,7 +534,7 @@
</profile>

<profile>
<id>local</id>
<id>predix-local</id>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -567,12 +565,72 @@
<excludes>
<exclude>**/ACSPerformanceIT.java</exclude>
<exclude>**/PolicyEvalCachingWithGraphDBIT.java</exclude>
<exclude>**/NonHierarchical*IT.java</exclude>
</excludes>
<includes>
<include>**/*IT.java</include>
<include>**/*Cucumber*.java</include>
<!-- Uncomment to run migration tests, manually -->
<!-- Uncomment to run migration tests, manually -->
<!-- <include>**/migration/AttributeMigrationTest.java</include> -->
</includes>
</configuration>
<executions>
<execution>
<id>integ-test</id>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>predix-local-titan</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<environmentVariables>
<SPRING_PROFILES_ACTIVE>h2,predix,simple-cache,titan</SPRING_PROFILES_ACTIVE>
</environmentVariables>
<forkCount>0</forkCount>
<parallel>methods</parallel>
<argLine></argLine>
<systemPropertyVariables>
<ACS_DEFAULT_ISSUER_ID>${ACS_DEFAULT_ISSUER_ID}</ACS_DEFAULT_ISSUER_ID>
<ACS_SERVICE_ID>predix-acs</ACS_SERVICE_ID>
<ACS_URL>http://localhost:8181</ACS_URL>
<NUREGO_API_URL>${NUREGO_API_URL}</NUREGO_API_URL>
<ZAC_UAA_URL>${ZAC_UAA_URL}</ZAC_UAA_URL>
<ZAC_URL>http://localhost:8888</ZAC_URL>
<!-- ACS zones (a.k.a tenancies) used for the tests -->
<ZONE1_NAME>${acs.zone.subdomain}</ZONE1_NAME>
<ZONE1_UAA_URL>${ZONE1_UAA_URL}</ZONE1_UAA_URL>
<ZONE2_NAME>${acs.zone.subdomain}2</ZONE2_NAME>
<ZONE2_UAA_URL>${ZONE2_UAA_URL}</ZONE2_UAA_URL>
<ZONE3_NAME>${acs.zone.subdomain}3</ZONE3_NAME>
<!-- proxy settings -->
<http.nonProxyHosts>${NON_PROXY_HOSTS}</http.nonProxyHosts>
<https.proxyHost>${HTTPS_PROXY_HOST}</https.proxyHost>
<https.proxyPort>${HTTPS_PROXY_PORT}</https.proxyPort>
</systemPropertyVariables>
<excludes>
<exclude>**/ACSPerformanceIT.java</exclude>
</excludes>
<includes>
<include>**/*IT.java</include>
<include>**/*Cucumber*.java</include>
<!-- Uncomment to run migration tests, manually -->
<!-- <include>**/migration/AttributeMigrationTest.java</include> -->
</includes>
</configuration>
Expand Down Expand Up @@ -685,9 +743,6 @@
<suiteXmlFiles>
<suiteXmlFile>testng-public.xml</suiteXmlFile>
</suiteXmlFiles>
<excludes>
<exclude>**/Hierarchical*IT.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
Expand Down Expand Up @@ -793,9 +848,6 @@
<suiteXmlFiles>
<suiteXmlFile>testng-public-titan.xml</suiteXmlFile>
</suiteXmlFiles>
<excludes>
<exclude>**/NonHierarchical*IT.java</exclude>
</excludes>
</configuration>
<executions>
<execution>
Expand Down
44 changes: 44 additions & 0 deletions service/start-acs-predix-titan.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#!/bin/bash
#*******************************************************************************
# Copyright 2016 General Electric Company.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#*******************************************************************************

export PROXY_OPTS=${PROXY_OPTS}
export DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
export ACS_SERVICE_ID=${ACS_SERVICE_ID}
export ACS_DEFAULT_ISSUER_ID=${ACS_DEFAULT_ISSUER_ID}
export ACS_BASE_DOMAIN=${ACS_BASE_DOMAIN}

export ZONE2_UAA_URL=${ZONE2_UAA_URL}

main() {
while [ "$1" != "" ]; do
case $1 in
'debug')
JAVA_DEBUG_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005"
shift
;;
*)
break
;;
esac
done

cp ${DIR}/target/acs-service-*.jar ${DIR}/.acs-service-copy.jar
SPRING_PROFILES_ACTIVE=h2,predix,simple-cache,titan \
java -Xms1g -Xmx1g $JAVA_DEBUG_OPTS $PROXY_OPTS -jar ${DIR}/.acs-service-copy.jar
}

main "$@"