Skip to content

Commit

Permalink
Revert "GEODE-7852: test SNI client against a geode (2-node) cluster (a…
Browse files Browse the repository at this point in the history
…pache#4925)" (apache#4940)

This reverts commit 4f2a604.
  • Loading branch information
Bill authored Apr 10, 2020
1 parent 7763ce5 commit b93cc01
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 216 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,10 @@
import org.apache.geode.cache.client.proxy.ProxySocketFactories;
import org.apache.geode.test.junit.rules.IgnoreOnWindowsRule;

/**
* This test runs against a 1-server, 1-locator Geode cluster. The server and locator run inside
* a (single) Docker container and are not route-able from the host (where this JUnit test is
* running). Another Docker container is running the HAProxy image and it's set up as an SNI
* gateway. The test connects to the gateway via SNI and the gateway (in one Docker container)
* forwards traffic to Geode members (running in the other Docker container).
*
* This test connects to the server and verifies it can write and read data in the region.
*/
public class SingleServerSNIAcceptanceTest {
public class ClientSNIAcceptanceTest {

private static final URL DOCKER_COMPOSE_PATH =
SingleServerSNIAcceptanceTest.class.getResource("docker-compose.yml");
ClientSNIAcceptanceTest.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 @@ -73,7 +64,7 @@ public class SingleServerSNIAcceptanceTest {
@Before
public void before() throws IOException, InterruptedException {
trustStorePath =
createTempFileFromResource(SingleServerSNIAcceptanceTest.class,
createTempFileFromResource(ClientSNIAcceptanceTest.class,
"geode-config/truststore.jks")
.getAbsolutePath();
docker.exec(options("-T"), "geode",
Expand All @@ -96,7 +87,7 @@ public void connectToSNIProxyDocker() {
.port(15443)
.getExternalPort();
ClientCache cache = new ClientCacheFactory(gemFireProps)
.addPoolLocator("locator-maeve", 10334)
.addPoolLocator("locator", 10334)
.setPoolSocketFactory(ProxySocketFactories.sni("localhost",
proxyPort))
.create();
Expand Down

This file was deleted.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,16 @@ frontend sniproxy
mode tcp
tcp-request inspect-delay 5s
tcp-request content accept if { req_ssl_hello_type 1 }
use_backend locators-maeve if { req.ssl_sni -i locator-maeve }
use_backend servers-dolores if { req.ssl_sni -i server-dolores }
use_backend servers-clementine if { req.ssl_sni -i server-clementine }
default_backend locators-maeve
use_backend locators if { req.ssl_sni -i locator }
use_backend servers if { req.ssl_sni -i server }
default_backend locators
log stdout format raw local0 debug

backend locators-maeve
backend locators
mode tcp
server locator1 geode:10334

backend servers-dolores
backend servers
mode tcp
server server1 geode:40404

backend servers-clementine
mode tcp
server server1 geode:40405

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
# limitations under the License.
#

start locator --name=locator-maeve --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 --hostname-for-clients=server-dolores --locators=localhost[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 locator --name=locator --hostname-for-clients=locator --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/locator-keystore.jks
start server --name=server --hostname-for-clients=server --locators=localhost[10334] --properties-file=/geode/config/gemfire.properties --security-properties-file=/geode/config/gfsecurity.properties --J=-Dgemfire.ssl-keystore=/geode/config/server-keystore.jks
connect --locator=localhost[10334] --use-ssl=true --security-properties-file=/geode/config/gfsecurity.properties
create region --name=jellyfish --type=REPLICATE
put --key=foo --value=bar --region=jellyfish
Expand Down

0 comments on commit b93cc01

Please sign in to comment.