stillalex commented on code in PR #1957: URL: https://github.com/apache/solr/pull/1957#discussion_r1336127313
########## solr/prometheus-exporter/src/test/org/apache/solr/prometheus/scraper/SolrStandaloneScraperBasicAuthTest.java: ########## @@ -0,0 +1,112 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.solr.prometheus.scraper; + +import io.prometheus.client.Collector; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.concurrent.ExecutorService; +import org.apache.lucene.tests.util.LuceneTestCase; +import org.apache.solr.SolrTestCaseJ4; +import org.apache.solr.client.solrj.impl.Http2SolrClient; +import org.apache.solr.common.util.ExecutorUtil; +import org.apache.solr.common.util.IOUtils; +import org.apache.solr.common.util.SolrNamedThreadFactory; +import org.apache.solr.prometheus.PrometheusExporterTestBase; +import org.apache.solr.prometheus.exporter.MetricsConfiguration; +import org.apache.solr.prometheus.exporter.PrometheusExporterSettings; +import org.apache.solr.prometheus.exporter.SolrClientFactory; +import org.apache.solr.prometheus.exporter.SolrScrapeConfiguration; +import org.apache.solr.prometheus.utils.Helpers; +import org.apache.solr.util.SolrJettyTestRule; +import org.junit.AfterClass; +import org.junit.BeforeClass; +import org.junit.ClassRule; +import org.junit.Test; + +public class SolrStandaloneScraperBasicAuthTest extends SolrTestCaseJ4 { + + @ClassRule public static final SolrJettyTestRule solrRule = new SolrJettyTestRule(); + + private static Http2SolrClient solrClient; + private static MetricsConfiguration configuration; + private static SolrStandaloneScraper solrScraper; + private static ExecutorService executor; + + private static String user = "solr"; + private static String pass = "SolrRocks"; + + @BeforeClass + public static void setupSolrHome() throws Exception { + Path solrHome = LuceneTestCase.createTempDir(); + Files.copy( + SolrTestCaseJ4.TEST_PATH().resolve("security.json"), solrHome.resolve("security.json")); Review Comment: it only has a user+pass. if one already exists and is available to this module I can try to use it, sure -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org