summaryrefslogtreecommitdiff
path: root/cpp/test
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/test')
-rw-r--r--cpp/test/Ice/proxy/AllTests.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/cpp/test/Ice/proxy/AllTests.cpp b/cpp/test/Ice/proxy/AllTests.cpp
index 25ae4428034..f8dcca81b2b 100644
--- a/cpp/test/Ice/proxy/AllTests.cpp
+++ b/cpp/test/Ice/proxy/AllTests.cpp
@@ -614,7 +614,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
test(pstr == "test -t:tcp -h 127.0.0.1 -p 12010 -t 10000");
// Working?
- p1->ice_ping();
+ bool ssl = communicator->getProperties()->getProperty("Ice.Default.Protocol") == "ssl";
+ if(!ssl)
+ {
+ p1->ice_ping();
+ }
// Two legal TCP endpoints expressed as opaque endpoints
p1 = communicator->stringToProxy("test:opaque -t 1 -v CTEyNy4wLjAuMeouAAAQJwAAAA==:opaque -t 1 -v CTEyNy4wLjAuMusuAAAQJwAAAA==");
@@ -627,11 +631,19 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
p1 = communicator->stringToProxy("test:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
pstr = communicator->proxyToString(p1);
- test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ if(!ssl)
+ {
+ test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ }
+ else
+ {
+ test(pstr == "test -t:ssl -h 127.0.0.1 -p 10001:opaque -t 99 -v abch");
+ }
//
// Try to invoke on the SSL endpoint to verify that we get a
- // NoEndpointException.
+ // NoEndpointException (or ConnectionRefusedException when
+ // running with SSL).
//
try
{
@@ -640,6 +652,11 @@ allTests(const Ice::CommunicatorPtr& communicator)
}
catch(const Ice::NoEndpointException&)
{
+ test(!ssl);
+ }
+ catch(const Ice::ConnectionRefusedException&)
+ {
+ test(ssl);
}
//
@@ -650,7 +667,14 @@ allTests(const Ice::CommunicatorPtr& communicator)
//
Ice::ObjectPrx p2 = derived->echo(p1);
pstr = communicator->proxyToString(p2);
- test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ if(!ssl)
+ {
+ test(pstr == "test -t:opaque -t 2 -v CTEyNy4wLjAuMREnAAD/////AA==:opaque -t 99 -v abch");
+ }
+ else
+ {
+ test(pstr == "test -t:ssl -h 127.0.0.1 -p 10001:opaque -t 99 -v abch");
+ }
cout << "ok" << endl;