diff --git a/addons/falcon-bridge/pom.xml b/addons/falcon-bridge/pom.xml index c2770c7..26c2fd3 100644 --- a/addons/falcon-bridge/pom.xml +++ b/addons/falcon-bridge/pom.xml @@ -241,37 +241,41 @@ <webApp> <contextPath>/</contextPath> <descriptor>${project.basedir}/../../webapp/src/test/webapp/WEB-INF/web.xml</descriptor> - <extraClasspath>${project.basedir}/../../webapp/target/test-classes/</extraClasspath> </webApp> <useTestScope>true</useTestScope> <systemProperties> + <force>true</force> <systemProperty> - <name>log4j.configuration</name> - <value>file://${project.basedir}/../../distro/src/conf/atlas-log4j.xml</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> + </systemProperty> + <systemProperty> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> <name>atlas.log.dir</name> <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.build.directory}/data</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.build.directory}/../../../intg/target/test-classes</value> + <name>log4j.configuration</name> + <value>file:///${project.build.directory}/test-classes/atlas-log4j.xml</value> </systemProperty> <systemProperty> - <key>atlas.home</key> - <value>${project.basedir}/target</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> diff --git a/addons/falcon-bridge/src/test/resources/atlas-application.properties b/addons/falcon-bridge/src/test/resources/atlas-application.properties index eff0aa4..282127c 100644 --- a/addons/falcon-bridge/src/test/resources/atlas-application.properties +++ b/addons/falcon-bridge/src/test/resources/atlas-application.properties @@ -16,17 +16,6 @@ # limitations under the License. # -#system property -atlas.data=${sys:user.dir}/target/data - - - -#re-use existing property -atlas.graph.data=${atlas.data}/graph - -#plain property -atlas.service=atlas - ######### Atlas Server Configs ######### atlas.rest.address=http://localhost:31000 diff --git a/addons/falcon-bridge/src/test/resources/atlas-log4j.xml b/addons/falcon-bridge/src/test/resources/atlas-log4j.xml new file mode 100755 index 0000000..a0f9629 --- /dev/null +++ b/addons/falcon-bridge/src/test/resources/atlas-log4j.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="Target" value="System.out"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + </layout> + </appender> + + <appender name="FILE" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/audit.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="METRICS" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/metric.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + </layout> + </appender> + + <appender name="FAILED" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/failed.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %m"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <!-- Uncomment the following for perf logs --> + <!-- + <appender name="perf_appender" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="file" value="${atlas.log.dir}/atlas_perf.log" /> + <param name="datePattern" value="'.'yyyy-MM-dd" /> + <param name="append" value="true" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d|%t|%m%n" /> + </layout> + </appender> + + <logger name="org.apache.atlas.perf" additivity="false"> + <level value="debug" /> + <appender-ref ref="perf_appender" /> + </logger> + --> + + <logger name="org.apache.atlas" additivity="false"> + <level value="info"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="com.thinkaurelius.titan" additivity="false"> + <level value="warn"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.eclipse" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="com.sun.jersey" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <!-- to avoid logs - The configuration log.flush.interval.messages = 1 was supplied but isn't a known config --> + <logger name="org.apache.kafka.common.config.AbstractConfig" additivity="false"> + <level value="error"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="AUDIT" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <logger name="METRICS" additivity="false"> + <level value="debug"/> + <appender-ref ref="METRICS"/> + </logger> + + <logger name="FAILED" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <root> + <priority value="warn"/> + <appender-ref ref="FILE"/> + </root> + +</log4j:configuration> diff --git a/addons/falcon-bridge/src/test/resources/policy-store.txt b/addons/falcon-bridge/src/test/resources/policy-store.txt new file mode 100644 index 0000000..048affe --- /dev/null +++ b/addons/falcon-bridge/src/test/resources/policy-store.txt @@ -0,0 +1,9 @@ +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:* +hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:* +rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:* diff --git a/addons/falcon-bridge/src/test/resources/users-credentials.properties b/addons/falcon-bridge/src/test/resources/users-credentials.properties new file mode 100644 index 0000000..3fc3bb1 --- /dev/null +++ b/addons/falcon-bridge/src/test/resources/users-credentials.properties @@ -0,0 +1,3 @@ +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +rangertagsync=RANGER_TAG_SYNC::e3f67240f5117d1753c940dae9eea772d36ed5fe9bd9c94a300e40413f1afb9d diff --git a/addons/hbase-bridge/pom.xml b/addons/hbase-bridge/pom.xml index f188e4a..874bf8c 100644 --- a/addons/hbase-bridge/pom.xml +++ b/addons/hbase-bridge/pom.xml @@ -385,33 +385,38 @@ </webApp> <useTestScope>true</useTestScope> <systemProperties> + <force>true</force> <systemProperty> - <name>log4j.configuration</name> - <value>file://${project.basedir}/../../distro/src/conf/atlas-log4j.xml</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> + </systemProperty> + <systemProperty> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> <name>atlas.log.dir</name> <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.build.directory}/data</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.build.directory}/../../../intg/target/test-classes</value> + <name>log4j.configuration</name> + <value>file:///${project.build.directory}/test-classes/atlas-log4j.xml</value> </systemProperty> <systemProperty> - <key>atlas.home</key> - <value>${project.basedir}/target</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> diff --git a/addons/hbase-bridge/src/test/resources/atlas-application.properties b/addons/hbase-bridge/src/test/resources/atlas-application.properties new file mode 100644 index 0000000..282127c --- /dev/null +++ b/addons/hbase-bridge/src/test/resources/atlas-application.properties @@ -0,0 +1,124 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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. +# + +######### Atlas Server Configs ######### +atlas.rest.address=http://localhost:31000 + +######### Graph Database Configs ######### + + +# Graph database implementation. Value inserted by maven. +atlas.graphdb.backend=org.apache.atlas.repository.graphdb.janus.AtlasJanusGraphDatabase + +# Graph Storage +atlas.graph.storage.backend=berkeleyje + +# Entity repository implementation +atlas.EntityAuditRepository.impl=org.apache.atlas.repository.audit.InMemoryEntityAuditRepository + +# Graph Search Index Backend +atlas.graph.index.search.backend=solr + +#Berkeley storage directory +atlas.graph.storage.directory=${sys:atlas.data}/berkley + +#hbase +#For standalone mode , specify localhost +#for distributed mode, specify zookeeper quorum here - For more information refer http://s3.thinkaurelius.com/docs/titan/current/hbase.html#_remote_server_mode_2 + +atlas.graph.storage.hostname=${graph.storage.hostname} +atlas.graph.storage.hbase.regions-per-server=1 +atlas.graph.storage.lock.wait-time=10000 + +#ElasticSearch +atlas.graph.index.search.directory=${sys:atlas.data}/es +atlas.graph.index.search.elasticsearch.client-only=false +atlas.graph.index.search.elasticsearch.local-mode=true +atlas.graph.index.search.elasticsearch.create.sleep=2000 + +# Solr cloud mode properties +atlas.graph.index.search.solr.mode=cloud +atlas.graph.index.search.solr.zookeeper-url=${solr.zk.address} +atlas.graph.index.search.solr.embedded=true +atlas.graph.index.search.max-result-set-size=150 + +######### Hive Lineage Configs ######### +## Schema +atlas.lineage.schema.query.hive_table=hive_table where __guid='%s'\, columns +atlas.lineage.schema.query.hive_table_v1=hive_table_v1 where __guid='%s'\, columns + +######### Notification Configs ######### +atlas.notification.embedded=true + +atlas.kafka.zookeeper.connect=localhost:19026 +atlas.kafka.bootstrap.servers=localhost:19027 +atlas.kafka.data=${sys:atlas.data}/kafka +atlas.kafka.zookeeper.session.timeout.ms=4000 +atlas.kafka.zookeeper.sync.time.ms=20 +atlas.kafka.consumer.timeout.ms=4000 +atlas.kafka.auto.commit.interval.ms=100 +atlas.kafka.hook.group.id=atlas +atlas.kafka.entities.group.id=atlas_entities +#atlas.kafka.auto.commit.enable=false + +atlas.kafka.enable.auto.commit=false +atlas.kafka.auto.offset.reset=earliest +atlas.kafka.session.timeout.ms=30000 + + + +######### Entity Audit Configs ######### +atlas.audit.hbase.tablename=ATLAS_ENTITY_AUDIT_EVENTS +atlas.audit.zookeeper.session.timeout.ms=1000 +atlas.audit.hbase.zookeeper.quorum=localhost +atlas.audit.hbase.zookeeper.property.clientPort=19026 + +######### Security Properties ######### + +# SSL config +atlas.enableTLS=false +atlas.server.https.port=31443 + +######### Security Properties ######### + +hbase.security.authentication=simple + +atlas.hook.falcon.synchronous=true + +######### JAAS Configuration ######## + +atlas.jaas.KafkaClient.loginModuleName = com.sun.security.auth.module.Krb5LoginModule +atlas.jaas.KafkaClient.loginModuleControlFlag = required +atlas.jaas.KafkaClient.option.useKeyTab = true +atlas.jaas.KafkaClient.option.storeKey = true +atlas.jaas.KafkaClient.option.serviceName = kafka +atlas.jaas.KafkaClient.option.keyTab = /etc/security/keytabs/atlas.service.keytab +atlas.jaas.KafkaClient.option.principal = atlas/_HOST@EXAMPLE.COM + +######### High Availability Configuration ######## +atlas.server.ha.enabled=false +#atlas.server.ids=id1 +#atlas.server.address.id1=localhost:21000 + +#########POLICY FILE PATH ######### +# atlas.auth.policy.file=policy-store.txt + +atlas.authentication.method.file=true +atlas.authentication.method.ldap.type=none +# atlas.authentication.method.file.filename=users-credentials.properties +atlas.authentication.method.kerberos=false \ No newline at end of file diff --git a/addons/hbase-bridge/src/test/resources/atlas-log4j.xml b/addons/hbase-bridge/src/test/resources/atlas-log4j.xml new file mode 100755 index 0000000..a0f9629 --- /dev/null +++ b/addons/hbase-bridge/src/test/resources/atlas-log4j.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="Target" value="System.out"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + </layout> + </appender> + + <appender name="FILE" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/audit.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="METRICS" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/metric.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + </layout> + </appender> + + <appender name="FAILED" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/failed.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %m"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <!-- Uncomment the following for perf logs --> + <!-- + <appender name="perf_appender" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="file" value="${atlas.log.dir}/atlas_perf.log" /> + <param name="datePattern" value="'.'yyyy-MM-dd" /> + <param name="append" value="true" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d|%t|%m%n" /> + </layout> + </appender> + + <logger name="org.apache.atlas.perf" additivity="false"> + <level value="debug" /> + <appender-ref ref="perf_appender" /> + </logger> + --> + + <logger name="org.apache.atlas" additivity="false"> + <level value="info"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="com.thinkaurelius.titan" additivity="false"> + <level value="warn"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.eclipse" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="com.sun.jersey" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <!-- to avoid logs - The configuration log.flush.interval.messages = 1 was supplied but isn't a known config --> + <logger name="org.apache.kafka.common.config.AbstractConfig" additivity="false"> + <level value="error"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="AUDIT" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <logger name="METRICS" additivity="false"> + <level value="debug"/> + <appender-ref ref="METRICS"/> + </logger> + + <logger name="FAILED" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <root> + <priority value="warn"/> + <appender-ref ref="FILE"/> + </root> + +</log4j:configuration> diff --git a/addons/hbase-bridge/src/test/resources/policy-store.txt b/addons/hbase-bridge/src/test/resources/policy-store.txt new file mode 100644 index 0000000..048affe --- /dev/null +++ b/addons/hbase-bridge/src/test/resources/policy-store.txt @@ -0,0 +1,9 @@ +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:* +hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:* +rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:* diff --git a/addons/hbase-bridge/src/test/resources/users-credentials.properties b/addons/hbase-bridge/src/test/resources/users-credentials.properties new file mode 100644 index 0000000..3fc3bb1 --- /dev/null +++ b/addons/hbase-bridge/src/test/resources/users-credentials.properties @@ -0,0 +1,3 @@ +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +rangertagsync=RANGER_TAG_SYNC::e3f67240f5117d1753c940dae9eea772d36ed5fe9bd9c94a300e40413f1afb9d diff --git a/addons/hive-bridge/pom.xml b/addons/hive-bridge/pom.xml index 4dfde27..96da76d 100755 --- a/addons/hive-bridge/pom.xml +++ b/addons/hive-bridge/pom.xml @@ -353,46 +353,38 @@ </webApp> <useTestScope>true</useTestScope> <systemProperties> + <force>true</force> <systemProperty> - <name>log4j.configuration</name> - <value>${project.basedir}/target/test-classes/atlas-log4j.xml</value> - </systemProperty> - <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> - </systemProperty> - <systemProperty> - <name>atlas.log.dir</name> - <value>${project.basedir}/target/logs</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.graphdb.backend</name> - <value>${graphdb.backend.impl}</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> </systemProperty> <systemProperty> - <name>keystore.file</name> - <value>${project.build.directory}/atlas.keystore - </value> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> - <name>truststore.file</name> - <value>${project.build.directory}/atlas.keystore</value> + <name>atlas.log.dir</name> + <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.home</name> - <value>${project.basedir}/target</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.basedir}/target/data</value> + <name>log4j.configuration</name> + <value>file:///${project.build.directory}/test-classes/atlas-log4j.xml</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.basedir}/target/test-classes</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> @@ -498,28 +490,6 @@ </execution> </executions> </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <phase>post-integration-test</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <delete dir="${project.build.directory}/data"/> - <delete dir="${project.build.directory}/logs"/> - - <delete dir="${basedir}/../../webapp/target/data"/> - <delete dir="${basedir}/../../webapp/target/logs"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> </project> diff --git a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java index 43ce087..1b1ebec 100755 --- a/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java +++ b/addons/hive-bridge/src/test/java/org/apache/atlas/hive/hook/HiveHookIT.java @@ -1460,8 +1460,7 @@ public class HiveHookIT extends HiveITBase { assertDBIsNotRegistered(dbName); } - // TODO: Need to investigate reason for failure and enable - @Test (enabled = false) + @Test public void testDropDatabaseWithoutCascade() throws Exception { //Test Deletion of database and its corresponding tables String dbName = "db" + random(); diff --git a/addons/hive-bridge/src/test/resources/atlas-application.properties b/addons/hive-bridge/src/test/resources/atlas-application.properties index eff0aa4..282127c 100644 --- a/addons/hive-bridge/src/test/resources/atlas-application.properties +++ b/addons/hive-bridge/src/test/resources/atlas-application.properties @@ -16,17 +16,6 @@ # limitations under the License. # -#system property -atlas.data=${sys:user.dir}/target/data - - - -#re-use existing property -atlas.graph.data=${atlas.data}/graph - -#plain property -atlas.service=atlas - ######### Atlas Server Configs ######### atlas.rest.address=http://localhost:31000 diff --git a/addons/sqoop-bridge/pom.xml b/addons/sqoop-bridge/pom.xml index 97ccad8..65c901b 100644 --- a/addons/sqoop-bridge/pom.xml +++ b/addons/sqoop-bridge/pom.xml @@ -304,37 +304,41 @@ <webApp> <contextPath>/</contextPath> <descriptor>${project.basedir}/../../webapp/src/test/webapp/WEB-INF/web.xml</descriptor> - <extraClasspath>${project.basedir}/../../webapp/target/test-classes/</extraClasspath> </webApp> <useTestScope>true</useTestScope> <systemProperties> + <force>true</force> <systemProperty> - <name>log4j.configuration</name> - <value>file://${project.basedir}/../../distro/src/conf/atlas-log4j.xml</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> + </systemProperty> + <systemProperty> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> <name>atlas.log.dir</name> <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.build.directory}/data</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.build.directory}/../../../intg/target/test-classes</value> + <name>log4j.configuration</name> + <value>file:///${project.build.directory}/test-classes/atlas-log4j.xml</value> </systemProperty> <systemProperty> - <key>atlas.home</key> - <value>${project.basedir}/target</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> @@ -441,25 +445,6 @@ </execution> </executions> </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <phase>post-integration-test</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <delete dir="${basedir}/target/data"/> - <delete dir="${basedir}/target/logs"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> </project> diff --git a/addons/sqoop-bridge/src/test/resources/atlas-application.properties b/addons/sqoop-bridge/src/test/resources/atlas-application.properties index eff0aa4..282127c 100644 --- a/addons/sqoop-bridge/src/test/resources/atlas-application.properties +++ b/addons/sqoop-bridge/src/test/resources/atlas-application.properties @@ -16,17 +16,6 @@ # limitations under the License. # -#system property -atlas.data=${sys:user.dir}/target/data - - - -#re-use existing property -atlas.graph.data=${atlas.data}/graph - -#plain property -atlas.service=atlas - ######### Atlas Server Configs ######### atlas.rest.address=http://localhost:31000 diff --git a/addons/sqoop-bridge/src/test/resources/atlas-log4j.xml b/addons/sqoop-bridge/src/test/resources/atlas-log4j.xml new file mode 100755 index 0000000..a0f9629 --- /dev/null +++ b/addons/sqoop-bridge/src/test/resources/atlas-log4j.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="Target" value="System.out"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + </layout> + </appender> + + <appender name="FILE" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/audit.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="METRICS" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/metric.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + </layout> + </appender> + + <appender name="FAILED" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/failed.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %m"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <!-- Uncomment the following for perf logs --> + <!-- + <appender name="perf_appender" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="file" value="${atlas.log.dir}/atlas_perf.log" /> + <param name="datePattern" value="'.'yyyy-MM-dd" /> + <param name="append" value="true" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d|%t|%m%n" /> + </layout> + </appender> + + <logger name="org.apache.atlas.perf" additivity="false"> + <level value="debug" /> + <appender-ref ref="perf_appender" /> + </logger> + --> + + <logger name="org.apache.atlas" additivity="false"> + <level value="info"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="com.thinkaurelius.titan" additivity="false"> + <level value="warn"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.eclipse" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="com.sun.jersey" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <!-- to avoid logs - The configuration log.flush.interval.messages = 1 was supplied but isn't a known config --> + <logger name="org.apache.kafka.common.config.AbstractConfig" additivity="false"> + <level value="error"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="AUDIT" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <logger name="METRICS" additivity="false"> + <level value="debug"/> + <appender-ref ref="METRICS"/> + </logger> + + <logger name="FAILED" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <root> + <priority value="warn"/> + <appender-ref ref="FILE"/> + </root> + +</log4j:configuration> diff --git a/addons/sqoop-bridge/src/test/resources/policy-store.txt b/addons/sqoop-bridge/src/test/resources/policy-store.txt new file mode 100644 index 0000000..048affe --- /dev/null +++ b/addons/sqoop-bridge/src/test/resources/policy-store.txt @@ -0,0 +1,9 @@ +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:* +hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:* +rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:* diff --git a/addons/sqoop-bridge/src/test/resources/users-credentials.properties b/addons/sqoop-bridge/src/test/resources/users-credentials.properties new file mode 100644 index 0000000..3fc3bb1 --- /dev/null +++ b/addons/sqoop-bridge/src/test/resources/users-credentials.properties @@ -0,0 +1,3 @@ +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +rangertagsync=RANGER_TAG_SYNC::e3f67240f5117d1753c940dae9eea772d36ed5fe9bd9c94a300e40413f1afb9d diff --git a/addons/storm-bridge/pom.xml b/addons/storm-bridge/pom.xml index 534ca7d..8e48367 100644 --- a/addons/storm-bridge/pom.xml +++ b/addons/storm-bridge/pom.xml @@ -114,6 +114,13 @@ <scope>test</scope> </dependency> + <dependency> + <groupId>org.eclipse.jetty</groupId> + <artifactId>jetty-util</artifactId> + <version>${jetty.version}</version> + <scope>test</scope> + </dependency> + <!-- to bring up atlas server for integration tests --> <dependency> @@ -324,37 +331,41 @@ <webApp> <contextPath>/</contextPath> <descriptor>${project.basedir}/../../webapp/src/test/webapp/WEB-INF/web.xml</descriptor> - <extraClasspath>${project.basedir}/../../webapp/target/test-classes/</extraClasspath> </webApp> <useTestScope>true</useTestScope> <systemProperties> + <force>true</force> <systemProperty> - <name>log4j.configuration</name> - <value>file://${project.basedir}/../../distro/src/conf/atlas-log4j.xml</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> + </systemProperty> + <systemProperty> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> <name>atlas.log.dir</name> - <value>${project.basedir}/target/logs</value> + <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.basedir}/target/data</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.build.directory}/../../../intg/target/test-classes</value> + <name>log4j.configuration</name> + <value>file:///${project.build.directory}/test-classes/atlas-log4j.xml</value> </systemProperty> <systemProperty> - <key>atlas.home</key> - <value>${project.basedir}/target</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> diff --git a/addons/storm-bridge/src/test/resources/atlas-application.properties b/addons/storm-bridge/src/test/resources/atlas-application.properties index eff0aa4..f46477a 100644 --- a/addons/storm-bridge/src/test/resources/atlas-application.properties +++ b/addons/storm-bridge/src/test/resources/atlas-application.properties @@ -16,20 +16,11 @@ # limitations under the License. # -#system property -atlas.data=${sys:user.dir}/target/data - - - -#re-use existing property -atlas.graph.data=${atlas.data}/graph - -#plain property -atlas.service=atlas - ######### Atlas Server Configs ######### atlas.rest.address=http://localhost:31000 + + ######### Graph Database Configs ######### diff --git a/addons/storm-bridge/src/test/resources/atlas-log4j.xml b/addons/storm-bridge/src/test/resources/atlas-log4j.xml new file mode 100755 index 0000000..a0f9629 --- /dev/null +++ b/addons/storm-bridge/src/test/resources/atlas-log4j.xml @@ -0,0 +1,137 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you 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. + --> + +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"> + <appender name="console" class="org.apache.log4j.ConsoleAppender"> + <param name="Target" value="System.out"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + </layout> + </appender> + + <appender name="FILE" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/${atlas.log.file}"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p - [%t:%x] ~ %m (%C{1}:%L)%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="AUDIT" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/audit.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <appender name="METRICS" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/metric.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %x %m%n"/> + <param name="maxFileSize" value="100MB" /> + </layout> + </appender> + + <appender name="FAILED" class="org.apache.log4j.RollingFileAppender"> + <param name="File" value="${atlas.log.dir}/failed.log"/> + <param name="Append" value="true"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %m"/> + <param name="maxFileSize" value="100MB" /> + <param name="maxBackupIndex" value="20" /> + </layout> + </appender> + + <!-- Uncomment the following for perf logs --> + <!-- + <appender name="perf_appender" class="org.apache.log4j.DailyRollingFileAppender"> + <param name="file" value="${atlas.log.dir}/atlas_perf.log" /> + <param name="datePattern" value="'.'yyyy-MM-dd" /> + <param name="append" value="true" /> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d|%t|%m%n" /> + </layout> + </appender> + + <logger name="org.apache.atlas.perf" additivity="false"> + <level value="debug" /> + <appender-ref ref="perf_appender" /> + </logger> + --> + + <logger name="org.apache.atlas" additivity="false"> + <level value="info"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="com.thinkaurelius.titan" additivity="false"> + <level value="warn"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="org.springframework" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="org.eclipse" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <logger name="com.sun.jersey" additivity="false"> + <level value="warn"/> + <appender-ref ref="console"/> + </logger> + + <!-- to avoid logs - The configuration log.flush.interval.messages = 1 was supplied but isn't a known config --> + <logger name="org.apache.kafka.common.config.AbstractConfig" additivity="false"> + <level value="error"/> + <appender-ref ref="FILE"/> + </logger> + + <logger name="AUDIT" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <logger name="METRICS" additivity="false"> + <level value="debug"/> + <appender-ref ref="METRICS"/> + </logger> + + <logger name="FAILED" additivity="false"> + <level value="info"/> + <appender-ref ref="AUDIT"/> + </logger> + + <root> + <priority value="warn"/> + <appender-ref ref="FILE"/> + </root> + +</log4j:configuration> diff --git a/addons/storm-bridge/src/test/resources/policy-store.txt b/addons/storm-bridge/src/test/resources/policy-store.txt new file mode 100644 index 0000000..048affe --- /dev/null +++ b/addons/storm-bridge/src/test/resources/policy-store.txt @@ -0,0 +1,9 @@ +##Policy Format +##r-READ, w-WRITE, u-UPDATE, d-DELETE +##Policy_Name;;User_Name1:Operations_Allowed,User_Name2:Operations_Allowed;;Group_Name1:Operations_Allowed,Group_Name2:Operations_Allowed;;Resource_Type1:Resource_Name,Resource_Type2:Resource_Name +## +adminPolicy;;admin:rwud;;ROLE_ADMIN:rwud;;type:*,entity:*,operation:* +dataScientistPolicy;;;;DATA_SCIENTIST:r;;type:*,entity:* +dataStewardPolicy;;;;DATA_STEWARD:rwu;;type:*,entity:* +hadoopPolicy;;;;hadoop:rwud;;type:*,entity:*,operation:* +rangerTagSyncPolicy;;;;RANGER_TAG_SYNC:r;;type:*,entity:* diff --git a/addons/storm-bridge/src/test/resources/users-credentials.properties b/addons/storm-bridge/src/test/resources/users-credentials.properties new file mode 100644 index 0000000..3fc3bb1 --- /dev/null +++ b/addons/storm-bridge/src/test/resources/users-credentials.properties @@ -0,0 +1,3 @@ +#username=group::sha256-password +admin=ADMIN::8c6976e5b5410415bde908bd4dee15dfb167a9c873fc4bb8a81f6f2ab448a918 +rangertagsync=RANGER_TAG_SYNC::e3f67240f5117d1753c940dae9eea772d36ed5fe9bd9c94a300e40413f1afb9d diff --git a/webapp/pom.xml b/webapp/pom.xml index 8430b9f..515c28c 100755 --- a/webapp/pom.xml +++ b/webapp/pom.xml @@ -573,6 +573,25 @@ </plugin> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-antrun-plugin</artifactId> + <executions> + <execution> + <phase>pre-integration-test</phase> + <goals> + <goal>run</goal> + </goals> + <configuration> + <tasks> + <delete dir="${project.build.directory}/data"/> + <delete dir="${project.build.directory}/logs"/> + </tasks> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> <configuration> @@ -593,45 +612,36 @@ <useTestScope>true</useTestScope> <systemProperties> <systemProperty> - <name>log4j.configuration</name> - <value>${log4j.configuration.url}</value> - </systemProperty> - <systemProperty> - <name>atlas.log.file</name> - <value>application.log</value> - </systemProperty> - <systemProperty> - <name>atlas.log.dir</name> - <value>${project.basedir}/target/logs</value> + <name>atlas.home</name> + <value>${project.build.directory}</value> </systemProperty> <systemProperty> - <name>atlas.graphdb.backend</name> - <value>${graphdb.backend.impl}</value> + <key>atlas.conf</key> + <value>${project.build.directory}/test-classes</value> </systemProperty> <systemProperty> - <name>keystore.file</name> - <value>${project.build.directory}/atlas.keystore - </value> + <name>atlas.data</name> + <value>${project.build.directory}/data</value> </systemProperty> <systemProperty> - <name>truststore.file</name> - <value>${project.build.directory}/atlas.keystore</value> + <name>atlas.log.dir</name> + <value>${project.build.directory}/logs</value> </systemProperty> <systemProperty> - <name>atlas.home</name> - <value>${project.basedir}/target</value> + <name>atlas.log.file</name> + <value>application.log</value> </systemProperty> <systemProperty> - <name>atlas.data</name> - <value>${project.basedir}/target/data</value> + <name>log4j.configuration</name> + <value>${log4j.configuration.url}</value> </systemProperty> <systemProperty> - <key>atlas.conf</key> - <value>${project.basedir}/target/test-classes</value> + <name>atlas.graphdb.backend</name> + <value>${graphdb.backend.impl}</value> </systemProperty> <systemProperty> <key>embedded.solr.directory</key> - <value>${project.basedir}/target</value> + <value>${project.build.directory}</value> </systemProperty> </systemProperties> <stopKey>atlas-stop</stopKey> @@ -713,25 +723,6 @@ <skipEnunciate>${skipEnunciate}</skipEnunciate> </configuration> </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - <execution> - <phase>post-integration-test</phase> - <goals> - <goal>run</goal> - </goals> - <configuration> - <tasks> - <delete dir="${project.build.directory}/data"/> - <delete dir="${project.build.directory}/logs"/> - </tasks> - </configuration> - </execution> - </executions> - </plugin> </plugins> </build> diff --git a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java index a173623..d7ae0f2 100644 --- a/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java +++ b/webapp/src/test/java/org/apache/atlas/web/filters/ActiveServerFilterTest.java @@ -137,7 +137,7 @@ public class ActiveServerFilterTest { activeServerFilter.doFilter(servletRequest, servletResponse, filterChain); - verify(servletResponse).sendRedirect(ACTIVE_SERVER_ADDRESS + "types?query%3DTRAIT"); + verify(servletResponse).sendRedirect(ACTIVE_SERVER_ADDRESS + "types?query=TRAIT"); } diff --git a/webapp/src/test/resources/atlas-application.properties b/webapp/src/test/resources/atlas-application.properties index 077a90f..d900916 100644 --- a/webapp/src/test/resources/atlas-application.properties +++ b/webapp/src/test/resources/atlas-application.properties @@ -16,24 +16,6 @@ # limitations under the License. # -#system property -atlas.data=${sys:user.dir}/target/data - - - -#re-use existing property -atlas.graph.data=${atlas.data}/graph - -#plain property -atlas.service=atlas - -#invalid system property -atlas.db=${atlasdb} - -atlas.TypeSystem.impl=org.apache.atlas.typesystem.types.TypeSystem - - - ######### Atlas Server Configs ######### atlas.rest.address=http://localhost:31000