Author: bpoussin Date: 2013-01-29 18:07:22 +0100 (Tue, 29 Jan 2013) New Revision: 2480 Url: http://nuiton.org/projects/nuiton-utils/repository/revisions/2480 Log: add test with https and authentication Added: trunk/nuiton-utils/src/test/resources/properties/ApplicationUpdaterNetworkTestAuth.properties Modified: trunk/nuiton-utils/src/test/java/org/nuiton/util/ApplicationUpdaterTest.java Modified: trunk/nuiton-utils/src/test/java/org/nuiton/util/ApplicationUpdaterTest.java =================================================================== --- trunk/nuiton-utils/src/test/java/org/nuiton/util/ApplicationUpdaterTest.java 2013-01-28 19:05:28 UTC (rev 2479) +++ trunk/nuiton-utils/src/test/java/org/nuiton/util/ApplicationUpdaterTest.java 2013-01-29 17:07:22 UTC (rev 2480) @@ -51,6 +51,10 @@ public Map<String, ApplicationInfo> updateToDo(Map<String, ApplicationInfo> appToUpdate) { log.info("Application to update\n" + appToUpdate); + for (ApplicationInfo info : appToUpdate.values()) { + info.login="ApplicationUpdate"; + info.password=new char[]{'p','a','s','s','w','o','r','d'}; + } return appToUpdate; } @@ -86,4 +90,12 @@ up.update(url, current, dest, false, new Callback()); } + @Test + public void testUpdateNetworkAuth() throws Exception { + ApplicationUpdater up = new ApplicationUpdater(); + String url = "http://svn.nuiton.org/svn/nuiton-utils/trunk/nuiton-utils/src/test/resources..."; + File current = new File("src/test/resources/ApplicationUpdater"); + File dest = new File("target/test/ApplicationUpdater/NEWNETWORKAUTH"); + up.update(url, current, dest, false, new Callback()); + } } Copied: trunk/nuiton-utils/src/test/resources/properties/ApplicationUpdaterNetworkTestAuth.properties (from rev 2467, trunk/nuiton-utils/src/test/resources/properties/ApplicationUpdaterNetworkTest.properties) =================================================================== --- trunk/nuiton-utils/src/test/resources/properties/ApplicationUpdaterNetworkTestAuth.properties (rev 0) +++ trunk/nuiton-utils/src/test/resources/properties/ApplicationUpdaterNetworkTestAuth.properties 2013-01-29 17:07:22 UTC (rev 2480) @@ -0,0 +1,32 @@ +### +# #%L +# Nuiton Utils :: Nuiton Utils +# $Id$ +# $HeadURL$ +# %% +# Copyright (C) 2004 - 2013 CodeLutin +# %% +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Lesser Public License for more details. +# +# You should have received a copy of the GNU General Lesser Public +# License along with this program. If not, see +# <http://www.gnu.org/licenses/lgpl-3.0.html>. +# #L% +### +App1.version=0.3 +App1.url=zip:https://ApplicationUpdate.nuiton.org/App1-0.3.zip +App1.auth=true +linux.App3.version=8 +linux.App3.url=zip:https://ApplicationUpdate.nuiton.org/App3-7.zip +linux.App3.auth=true +linux.amd64.App2.version=7 +linux.amd64.App2.url=zip:https://ApplicationUpdate.nuiton.org/App2-7.zip +linux.amd64.App2.auth=true