summaryrefslogtreecommitdiff
path: root/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/orber/test/orber_firewall_ipv4_in_SUITE.erl')
-rw-r--r--lib/orber/test/orber_firewall_ipv4_in_SUITE.erl47
1 files changed, 19 insertions, 28 deletions
diff --git a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
index a76682608f..6d085d3bf5 100644
--- a/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
+++ b/lib/orber/test/orber_firewall_ipv4_in_SUITE.erl
@@ -30,7 +30,7 @@
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContextExt.hrl").
-include_lib("orber/COSS/CosNaming/CosNaming_NamingContext.hrl").
--define(default_timeout, ?t:minutes(15)).
+-define(default_timeout, test_server:minutes(15)).
-define(match(ExpectedRes,Expr),
fun() ->
@@ -43,7 +43,7 @@
_ ->
io:format("###### ERROR ERROR ######~nRESULT: ~p~n",
[AcTuAlReS]),
- ?line exit(AcTuAlReS)
+ exit(AcTuAlReS)
end
end()).
@@ -87,12 +87,12 @@ cases() ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
+ Dog=test_server:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
+ Dog = proplists:get_value(watchdog, Config),
test_server:timetrap_cancel(Dog),
ok.
@@ -113,8 +113,7 @@ end_per_suite(Config) ->
%%-----------------------------------------------------------------
%% Incomming connections - Deny
%%-----------------------------------------------------------------
-deny_port_api(doc) -> ["Deny Access due to invalid local port"];
-deny_port_api(suite) -> [];
+%% Deny Access due to invalid local port
deny_port_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -123,11 +122,10 @@ deny_port_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_port_range_api(doc) -> ["Deny Access due to invalid local port range"];
-deny_port_range_api(suite) -> [];
+%% Deny Access due to invalid local port range
deny_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -136,12 +134,11 @@ deny_port_range_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_host_api(doc) -> ["Deny Access due to invalid host"];
-deny_host_api(suite) -> [];
+%% Deny Access due to invalid host
deny_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -150,11 +147,10 @@ deny_host_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-deny_peerhost_api(doc) -> ["Deny Access due to invalid peerhost"];
-deny_peerhost_api(suite) -> [];
+%% Deny Access due to invalid peerhost
deny_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -163,14 +159,13 @@ deny_peerhost_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'EXCEPTION', #'CosNaming_NamingContextExt_InvalidAddress'{}},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Incomming connections - Allow
%%-----------------------------------------------------------------
-allow_port_range_api(doc) -> ["Allow Access due to valid local port range"];
-allow_port_range_api(suite) -> [];
+%% Allow Access due to valid local port range
allow_port_range_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -181,12 +176,11 @@ allow_port_range_api(_Config) ->
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_host_api(doc) -> ["Allow Access due to valid host"];
-allow_host_api(suite) -> [];
+%% Allow Access due to valid host
allow_host_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -197,11 +191,10 @@ allow_host_api(_Config) ->
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
?match(false, corba_object:not_existent(IOR)),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
-allow_peerhost_api(doc) -> ["Allow Access due to valid peerhost"];
-allow_peerhost_api(suite) -> [];
+%% Allow Access due to valid peerhost
allow_peerhost_api(_Config) ->
[IP] = ?match([_], orber:host()),
{ok, ServerNode, _ServerHost} =
@@ -218,14 +211,12 @@ allow_peerhost_api(_Config) ->
[#'IOP_ServiceContext'
{context_id=?ORBER_GENERIC_CTX_ID,
context_data = {interface, IP}}])),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.
%%-----------------------------------------------------------------
%% Test corbaloc strings
%%-----------------------------------------------------------------
-check_address_api(doc) -> ["Test corbaloc strings"];
-check_address_api(suite) -> [];
check_address_api(_Config) ->
?match({[[iiop,{1,0},"10.0.0.1",2809]],"NameService"},
orber_cosnaming_utils:addresses(":10.0.0.1/NameService")),
@@ -287,7 +278,7 @@ check_address_api(_Config) ->
ServerPort = orber_test_lib:remote_apply(ServerNode, orber, iiop_port, []),
?match({'IOP_IOR',_,_},
corba:string_to_object("corbaloc::1.2@"++IP++":"++integer_to_list(ServerPort)++"/NameService")),
-% ?line catch orber_test_lib:destroy_node(ServerNode, timeout),
+% catch orber_test_lib:destroy_node(ServerNode, timeout),
ok.