Skip to content

Commit

Permalink
[Revert] Accidental backport to support/1.13 (#6637)
Browse files Browse the repository at this point in the history
This reverts commit 35cbee2.
This reverts commit aba29fb.
This reverts commit 844f2a7.
This reverts commit a55e472.
This reverts commit 53d32c3.
  • Loading branch information
Ernie Burghardt authored Jun 22, 2021
1 parent 8a6da17 commit b4d5a43
Show file tree
Hide file tree
Showing 48 changed files with 317 additions and 796 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,11 @@ public static void beforeClass() throws IOException, InterruptedException {
}

@AfterClass
public static void afterClass() {
printlog("locator-maeve");
printlog("server-dolores");
}

private static void printlog(String name) {
try {
String output =
docker.get().exec(options("-T"), "geode",
arguments("cat", name + "/" + name + ".log"));
System.out.println(name + " log file--------------------------------\n" + output);
} catch (Throwable ignore) {
}
public static void afterClass() throws Exception {
String output =
docker.get().exec(options("-T"), "geode",
arguments("cat", "server-dolores/server-dolores.log"));
System.out.println("Server log file--------------------------------\n" + output);
}

@Before
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

import com.palantir.docker.compose.DockerComposeRule;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
Expand Down Expand Up @@ -61,7 +60,7 @@
public class DualServerSNIAcceptanceTest {

private static final URL DOCKER_COMPOSE_PATH =
DualServerSNIAcceptanceTest.class.getResource("dual-server-docker-compose.yml");
SingleServerSNIAcceptanceTest.class.getResource("docker-compose.yml");

// Docker compose does not work on windows in CI. Ignore this test on windows
// Using a RuleChain to make sure we ignore the test before the rule comes into play
Expand All @@ -75,17 +74,8 @@ public class DualServerSNIAcceptanceTest {

@BeforeClass
public static void beforeClass() throws Exception {
docker.get().exec(options("-T"), "locator-maeve",
arguments("gfsh", "run", "--file=/geode/scripts/locator-maeve.gfsh"));

docker.get().exec(options("-T"), "server-dolores",
arguments("gfsh", "run", "--file=/geode/scripts/server-dolores.gfsh"));

docker.get().exec(options("-T"), "server-clementine",
arguments("gfsh", "run", "--file=/geode/scripts/server-clementine.gfsh"));

docker.get().exec(options("-T"), "locator-maeve",
arguments("gfsh", "run", "--file=/geode/scripts/create-regions.gfsh"));
docker.get().exec(options("-T"), "geode",
arguments("gfsh", "run", "--file=/geode/scripts/geode-starter-2.gfsh"));

final String trustStorePath =
createTempFileFromResource(SingleServerSNIAcceptanceTest.class,
Expand All @@ -107,18 +97,6 @@ public void after() {
ensureCacheClosed();
}

@AfterClass
public static void afterClass() throws Exception {
// if you need to capture logs for one of the processes use this pattern:
// try {
// String output =
// docker.get().exec(options("-T"), "locator-maeve",
// arguments("cat", "locator-maeve/locator-maeve.log"));
// System.out.println("Locator log file--------------------------------\n" + output);
// } catch (Throwable ignore) {
// }
}

@Test
public void successfulRoutingTest() {
verifyPutAndGet("group-dolores", "region-dolores");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package org.apache.geode.client.sni;

import java.io.File;
import java.net.InetAddress;
import java.net.URL;

import org.apache.geode.cache.ssl.CertStores;
Expand Down Expand Up @@ -50,8 +51,10 @@ public void generateStores() throws Exception {
CertificateMaterial certificate = new CertificateBuilder(365 * 100, "SHA256withRSA")
.commonName(certName)
.issuedBy(ca)
.sanDnsName(certName)
.sanDnsName("geode")
.sanDnsName("geode") // for inside the docker container
.sanDnsName("localhost") // for inside the docker container
.sanIpAddress(InetAddress.getByName("0.0.0.0")) // for inside the docker container
.sanDnsName(certName) // for client endpoint validation
.generate();

CertStores store = new CertStores(certName);
Expand Down

This file was deleted.

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#
# 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.
#

start locator --name=locator-maeve --connect=false --redirect-output --hostname-for-clients=locator-maeve --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-maeve-keystore.jks
start server --name=server-dolores --group=group-dolores --hostname-for-clients=server-dolores --locators=geode[10334] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-dolores-keystore.jks
start server --name=server-clementine --group=group-clementine --hostname-for-clients=server-clementine --server-port=40405 --locators=geode[10334] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-clementine-keystore.jks
connect --locator=geode[10334] --use-ssl=true --security-properties-file=/geode/config/gfsecurity.properties
create region --name=region-dolores --group=group-dolores --type=REPLICATE
create region --name=region-clementine --group=group-clementine --type=REPLICATE
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# limitations under the License.
#

start locator --name=locator-maeve --connect=false --hostname-for-clients=locator-maeve --jmx-manager-hostname-for-clients=geode --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-maeve-keystore.jks
start locator --name=locator-maeve --connect=false --hostname-for-clients=locator-maeve --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-maeve-keystore.jks
start server --name=server-dolores --max-heap=256m --hostname-for-clients=server-dolores --locators=geode[10334] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-dolores-keystore.jks
connect --locator=geode[10334] --use-ssl=true --security-properties-file=/geode/config/gfsecurity.properties
create region --name=jellyfish --type=REPLICATE
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;

import java.io.InputStream;
import java.io.OutputStream;
import java.util.Properties;

import org.junit.Before;
Expand Down Expand Up @@ -81,11 +79,7 @@ public void startLocatorRespectsJmxManagerHostnameForClients() throws Exception

@Test
public void startWithBindAddress() throws Exception {
final Process mockProcess = mock(Process.class);
doReturn(mock(InputStream.class)).when(mockProcess).getInputStream();
doReturn(mock(InputStream.class)).when(mockProcess).getErrorStream();
doReturn(mock(OutputStream.class)).when(mockProcess).getOutputStream();
doReturn(mockProcess).when(spy).getProcess(any(), any());
doReturn(mock(Process.class)).when(spy).getProcess(any(), any());
commandRule.executeAndAssertThat(spy, "start locator --bind-address=127.0.0.1");

ArgumentCaptor<String[]> commandLines = ArgumentCaptor.forClass(String[].class);
Expand Down
Loading

0 comments on commit b4d5a43

Please sign in to comment.