Ignore:
Timestamp:
2018-08-19T21:40:37+02:00 (6 years ago)
Author:
Don-vip
Message:

fix #16656 - appveyor: tweak configuration and skip troublesome tests to get suite completing (patch by ris)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/RemoteControlTest.java

    r12849 r14168  
    1414import java.nio.file.Paths;
    1515import java.security.GeneralSecurityException;
     16import java.security.KeyStore.TrustedCertificateEntry;
    1617import java.security.SecureRandom;
    1718import java.security.cert.X509Certificate;
     
    2728import org.junit.Test;
    2829import org.openstreetmap.josm.JOSMFixture;
     30import org.openstreetmap.josm.TestUtils;
    2931import org.openstreetmap.josm.spi.preferences.Config;
    3032import org.openstreetmap.josm.tools.Logging;
     33import org.openstreetmap.josm.tools.PlatformHookWindows;
     34import org.openstreetmap.josm.tools.PlatformManager;
    3135
    3236import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
     37import mockit.Mock;
     38import mockit.MockUp;
    3339
    3440/**
     
    4955        RemoteControl.PROP_REMOTECONTROL_HTTPS_ENABLED.put(true);
    5056        deleteKeystore();
     57
     58        if (PlatformManager.isPlatformWindows() && "True".equals(System.getenv("APPVEYOR"))) {
     59            // appveyor doesn't like us tinkering with the root keystore, so mock this out
     60            TestUtils.assumeWorkingJMockit();
     61            new MockUp<PlatformHookWindows>() {
     62                @Mock
     63                public boolean setupHttpsCertificate(String entryAlias, TrustedCertificateEntry trustedCert) {
     64                    return true;
     65                }
     66            };
     67        }
    5168
    5269        RemoteControl.start();
Note: See TracChangeset for help on using the changeset viewer.