Ticket #16656: v1-0004-appveyor-PlatformHookWindowsTest-skip-testSetupHt.patch

File v1-0004-appveyor-PlatformHookWindowsTest-skip-testSetupHt.patch, 1.6 KB (added by ris, 6 years ago)
  • test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java

    From cac3e8cabacb7e4b6f0bc680cc0df9af3f775962 Mon Sep 17 00:00:00 2001
    From: Robert Scott <code@humanleg.org.uk>
    Date: Sat, 18 Aug 2018 21:26:45 +0100
    Subject: [PATCH v1 4/5] appveyor: PlatformHookWindowsTest: skip
     testSetupHttpsCertificate
    
    appveyor doesn't like us tinkering with the root keystore
    ---
     test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java | 4 ++++
     1 file changed, 4 insertions(+)
    
    diff --git a/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java b/test/unit/org/openstreetmap/josm/tools/PlatformHookWindowsTest.java
    index cb4cff675..7255cb500 100644
    a b import static org.junit.Assert.assertFalse;  
    66import static org.junit.Assert.assertNotNull;
    77import static org.junit.Assert.assertNull;
    88import static org.junit.Assert.assertTrue;
     9import static org.junit.Assume.assumeFalse;
    910import static org.junit.Assert.fail;
    1011
    1112import java.io.File;
    public class PlatformHookWindowsTest {  
    8889     */
    8990    @Test
    9091    public void testSetupHttpsCertificate() throws Exception {
     92        // appveyor doesn't like us tinkering with the root keystore
     93        assumeFalse(PlatformManager.isPlatformWindows() && "True".equals(System.getenv("APPVEYOR")));
     94
    9195        RemoteControlTest.deleteKeystore();
    9296        KeyStore ks = RemoteControlHttpsServer.loadJosmKeystore();
    9397        TrustedCertificateEntry trustedCert = new KeyStore.TrustedCertificateEntry(ks.getCertificate(ks.aliases().nextElement()));