archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject [09/10] archiva git commit: fix issue when using proxy
Date Thu, 01 Oct 2015 07:42:25 GMT
fix issue when using proxy


Project: http://git-wip-us.apache.org/repos/asf/archiva/repo
Commit: http://git-wip-us.apache.org/repos/asf/archiva/commit/4ce3140d
Tree: http://git-wip-us.apache.org/repos/asf/archiva/tree/4ce3140d
Diff: http://git-wip-us.apache.org/repos/asf/archiva/diff/4ce3140d

Branch: refs/heads/master
Commit: 4ce3140da9230710007669765f9579f0bd76cd82
Parents: da1216f
Author: Olivier Lamy <olamy@apache.org>
Authored: Thu Oct 1 16:13:29 2015 +1000
Committer: Olivier Lamy <olamy@apache.org>
Committed: Thu Oct 1 16:13:29 2015 +1000

----------------------------------------------------------------------
 archiva-modules/archiva-base/archiva-proxy/pom.xml          | 7 +++++++
 .../org/apache/archiva/proxy/HttpProxyTransferTest.java     | 9 +++++----
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/archiva/blob/4ce3140d/archiva-modules/archiva-base/archiva-proxy/pom.xml
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/pom.xml b/archiva-modules/archiva-base/archiva-proxy/pom.xml
index 83e0ce0..7abec48 100644
--- a/archiva-modules/archiva-base/archiva-proxy/pom.xml
+++ b/archiva-modules/archiva-base/archiva-proxy/pom.xml
@@ -204,6 +204,11 @@
       <artifactId>xercesImpl</artifactId>
       <scope>test</scope>
     </dependency>
+    <dependency>
+      <groupId>org.assertj</groupId>
+      <artifactId>assertj-core</artifactId>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
   <build>
     <plugins>
@@ -260,6 +265,8 @@
             <redback.jdbc.url>${redbackTestJdbcUrl}</redback.jdbc.url>
             <redback.jdbc.driver.name>${redbackTestJdbcDriver}</redback.jdbc.driver.name>
             <archiva.repositorySessionFactory.id>mock</archiva.repositorySessionFactory.id>
+            <http.proxyHost></http.proxyHost>
+            <http.proxyPort></http.proxyPort>
           </systemPropertyVariables>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/archiva/blob/4ce3140d/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
----------------------------------------------------------------------
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
index b96a261..f0ca4f5 100644
--- a/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
+++ b/archiva-modules/archiva-base/archiva-proxy/src/test/java/org/apache/archiva/proxy/HttpProxyTransferTest.java
@@ -36,6 +36,7 @@ import org.apache.archiva.policies.PropagateErrorsOnUpdateDownloadPolicy;
 import org.apache.archiva.policies.ReleasesPolicy;
 import org.apache.archiva.policies.SnapshotsPolicy;
 import org.apache.archiva.repository.ManagedRepositoryContent;
+import org.assertj.core.api.Assertions;
 import org.eclipse.jetty.server.Handler;
 import org.eclipse.jetty.server.Request;
 import org.eclipse.jetty.server.Server;
@@ -199,8 +200,8 @@ public class HttpProxyTransferTest
     public void testGetOverHttpProxy()
         throws Exception
     {
-        assertNull( System.getProperty( "http.proxyHost" ) );
-        assertNull( System.getProperty( "http.proxyPort" ) );
+        Assertions.assertThat( System.getProperty( "http.proxyHost" ) ).isEmpty();
+        Assertions.assertThat( System.getProperty( "http.proxyPort" ) ).isEmpty();
 
         String path = "org/apache/maven/test/get-default-layout/1.0/get-default-layout-1.0.jar";
 
@@ -226,8 +227,8 @@ public class HttpProxyTransferTest
         String actualContents = FileUtils.readFileToString( downloadedFile, Charset.defaultCharset()
);
         assertEquals( "Check file contents.", expectedContents, actualContents );
 
-        assertNull( System.getProperty( "http.proxyHost" ) );
-        assertNull( System.getProperty( "http.proxyPort" ) );
+        Assertions.assertThat( System.getProperty( "http.proxyHost" ) ).isEmpty();
+        Assertions.assertThat( System.getProperty( "http.proxyPort" ) ).isEmpty();
     }
 
     private void addConnector()


Mime
View raw message