Project

General

Profile

« Previous | Next » 

Revision 8103

default to non-https when testing localhost. If the developer has a hostname configured with https, it will correctly use this configured baseUrl, otherwise it will just use http://localhost.

View differences:

test/edu/ucsb/nceas/metacat/dataone/SolrQueryAccessFilterTest.java
266 266
        org.dataone.service.types.v1.Node node = MNodeService.getInstance(request).getCapabilities();
267 267
        CertificateManager.getInstance().setCertificateLocation(INTRUSTCERTFILE);
268 268
        String baseURL = node.getBaseURL();
269
        //System.out.println("================The base url is "+baseURL);
269
        System.out.println("================The base url is "+baseURL);
270
        if (baseURL.contains("https://localhost")) {
271
        	// force localhost to skip https - most common for devs
272
        	baseURL = baseURL.replace("https", "http");
273
        	baseURL = baseURL.replace("8443", "8080");
274
        	baseURL = baseURL.replace("443", "80");
275
        }
276
        System.out.println("================The MODIFIED base url is "+baseURL);
270 277
        MNode mnNode = D1Client.getMN(baseURL);
271 278
        input = mnNode.query(SOLR, generateQuery(id.getValue()));
272 279
        doc = generateDoc(input);

Also available in: Unified diff