Skip to content

Commit 6266b79

Browse files
committed
Add capability to use default props in a test run
1 parent e57068f commit 6266b79

2 files changed

Lines changed: 12 additions & 1 deletion

File tree

build.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ test-exec.classpath=${test-compile.classpath};${restsql-lib.dir}/mysql-connector
77
test.list=src/resources/xml/service/testcase/_tests.txt
88
org.restsql.baseUri=http://localhost:8080/restsql/
99
org.restsql.properties=/resources/properties/restsql-mysql.properties
10+
org.restsql.default-properties=../restsql/src/resources/properties/default-restsql.properties
1011
org.restsql.testDatabase=sakila

build.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@
124124
</antcall>
125125
</target>
126126

127+
<target name="test-service-java-default-properties" description="executes all test cases for the service's java interface, excluding security">
128+
<antcall target="-test-service">
129+
<param name="style" value="java" />
130+
<param name="scope" value="all" />
131+
<param name="exclude" value="Security" />
132+
<param name="propertiesFile" value="${org.restsql.default-properties}" />
133+
</antcall>
134+
</target>
135+
127136
<target name="test-service-java-subset" description="executes some test cases for the service's java interface">
128137
<antcall target="-test-service">
129138
<param name="style" value="java" />
@@ -133,12 +142,13 @@
133142
</target>
134143

135144
<target name="-test-service" depends="compile-tests">
145+
<property name="propertiesFile" value="${org.restsql.properties}" />
136146
<java fork="true" classpath="${test-exec.classpath}" classname="org.restsql.service.ServiceTestRunner" dir="${basedir}">
137147
<arg value="${style}" />
138148
<arg value="${scope}" />
139149
<arg value="${exclude}" />
140150
<jvmarg value="-Dorg.restsql.baseUri=${org.restsql.baseUri}" />
141-
<jvmarg value="-Dorg.restsql.properties=${org.restsql.properties}" />
151+
<jvmarg value="-Dorg.restsql.properties=${propertiesFile}" />
142152
<jvmarg value="-Dorg.restsql.testDatabase=${org.restsql.testDatabase}" />
143153
</java>
144154
</target>

0 commit comments

Comments
 (0)