Project

General

Profile

« Previous | Next » 

Revision 8090

Added by Jing Tao over 11 years ago

Add the test properties.

View differences:

metacat-common/src/test/java/edu/ucsb/nceas/metacat/common/MetacatCommonTestBase.java
1 1
package edu.ucsb.nceas.metacat.common;
2 2

  
3
import java.io.File;
3 4
import java.io.FileInputStream;
4 5
import java.io.FileNotFoundException;
5 6
import java.io.IOException;
6 7
import java.util.Properties;
7 8

  
8 9
import org.apache.commons.configuration.ConfigurationException;
10
import org.apache.commons.io.FileUtils;
9 11
import org.dataone.configuration.Settings;
10 12
import org.junit.Before;
11 13

  
......
22 24
        //metacatTestProperties.load(new FileInputStream("../test/test.properties"));
23 25
        //String metacatContextDir = metacatTestProperties.getProperty("metacat.contextDir");
24 26
        Settings.getConfiguration();
25
        Settings.augmentConfiguration("../lib/metacat.properties");
27
        File srcDir = new File("../metacat-index/src/main/resources/solr-home");
28
        File destDir = new File("target/classes/solr-home");
29
        FileUtils.copyDirectory(srcDir, destDir);
30
        //Settings.augmentConfiguration("../lib/metacat.properties");
26 31
    }
27 32
}
metacat-common/src/test/resources/org/dataone/configuration/config.xml
1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!-- Apache Commons Configuration -->
3
<configuration>
4
	<properties fileName="test.properties"/>
5
</configuration>
metacat-common/src/test/resources/org/dataone/configuration/test.properties
1
dbquery.enabledEngines=pathquery;solr
2
dataone.hazelcast.configFilePath=../lib/hazelcast.xml
3
dataone.hazelcast.storageCluster.systemMetadataMap=hzSystemMetadata
4
dataone.hazelcast.storageCluster.objectPathMap=hzObjectPath
5
dataone.hazelcast.storageCluster.identifiersSet=hzIdentifiers
6
index.hazelcast.indexqueue=hzIndexQueue
7
index.hazelcast.indexeventmap=hzIndexEventMap
8

  
9
#Embedded (default):
10
solr.server.classname=org.apache.solr.client.solrj.embedded.EmbeddedSolrServer
11
solr.homeDir=target/classes/solr-home
12
solr.configFileName=solr.xml
13
solr.collectionName=collection1
14
  
15
#HTTP:
16
#solr.server.classname=org.apache.solr.client.solrj.impl.CommonsHttpSolrServer
17
#solr.endpoint=http://localhost:8080/solr/
18
#sorl.schema.urlappendix=/admin/file/?contentType=text/xml;charset=utf-8&file=schema.xml
19
#solr.config.urlappendix=/admin/file/?contentType=text/xml;charset=utf-8&file=solrconfig.xml
20
#solr.systeminfo.urlappendix=/admin/system
21
 
22
server.name=localhost
23
server.httpPort=8080
24
server.httpSSLPort=443
25
application.context=knb

Also available in: Unified diff