From 1ce7039d4f570c61dd940df84c7913e16fae054c Mon Sep 17 00:00:00 2001 From: Martin Stockhammer Date: Thu, 25 Oct 2018 12:25:33 +0200 Subject: Adding env variable for user config file --- .../test/java/org/apache/archiva/web/rss/RssFeedServletTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'archiva-modules/archiva-web') diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java index b798423d2..850b0a81d 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/web/rss/RssFeedServletTest.java @@ -21,6 +21,7 @@ package org.apache.archiva.web.rss; import junit.framework.TestCase; +import org.apache.archiva.configuration.ArchivaConfiguration; import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner; import org.apache.commons.codec.Encoder; import org.apache.commons.codec.binary.Base64; @@ -74,8 +75,8 @@ public class RssFeedServletTest public static void initConfigurationPath() throws Exception { - PREVIOUS_ARCHIVA_PATH = System.getProperty( "archiva.user.configFileName" ); - System.setProperty( "archiva.user.configFileName", + PREVIOUS_ARCHIVA_PATH = System.getProperty(ArchivaConfiguration.USER_CONFIG_PROPERTY); + System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY, System.getProperty( "test.resources.path/" ) + "empty-archiva.xml" ); } @@ -84,7 +85,7 @@ public class RssFeedServletTest public static void restoreConfigurationPath() throws Exception { - System.setProperty( "archiva.user.configFileName", PREVIOUS_ARCHIVA_PATH ); + System.setProperty( ArchivaConfiguration.USER_CONFIG_PROPERTY, PREVIOUS_ARCHIVA_PATH ); } @Before -- cgit v1.2.3