diff options
author | Stefan Metzmacher <metze@samba.org> | 2014-02-13 18:00:36 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2014-03-25 00:45:28 +0100 |
commit | 0ecf01a1377352477a844cbf4fefb5271d0e8a32 (patch) | |
tree | ba7d21bc3e87e63d2a909831d344b1f18c298161 /source4/librpc | |
parent | 8a6694707385fb1ccd7b38ff5643fdc278ba3400 (diff) | |
download | samba-0ecf01a1377352477a844cbf4fefb5271d0e8a32.tar.gz |
s4:librpc/tests: add more no transport tests
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/tests/binding_string.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/source4/librpc/tests/binding_string.c b/source4/librpc/tests/binding_string.c index a790616e7df..bc5d06e47cd 100644 --- a/source4/librpc/tests/binding_string.c +++ b/source4/librpc/tests/binding_string.c @@ -218,9 +218,9 @@ static bool test_parse_check_results(struct torture_context *tctx) return true; } -static bool test_no_transport(struct torture_context *tctx) +static bool test_no_transport(struct torture_context *tctx, const void *test_data) { - const char *binding = "somehost"; + const char *binding = test_data; struct dcerpc_binding *b; enum dcerpc_transport_t transport; const char *s; @@ -241,6 +241,15 @@ static bool test_no_transport(struct torture_context *tctx) return true; } +static const char *test_no_strings[] = { + "port75.example.com", + "port75.example.com[75]", + "127.0.0.1", + "127.0.0.1[75]", + "127.0.0.1[,target_hostname=port75.example.com]", + "127.0.0.1[75,target_hostname=port75.example.com]", +}; + struct torture_suite *torture_local_binding_string(TALLOC_CTX *mem_ctx) { int i; @@ -252,7 +261,11 @@ struct torture_suite *torture_local_binding_string(TALLOC_CTX *mem_ctx) test_strings[i]); } - torture_suite_add_simple_test(suite, "no transport",test_no_transport); + for (i = 0; i < ARRAY_SIZE(test_no_strings); i++) { + torture_suite_add_simple_tcase_const(suite, test_no_strings[i], + test_no_transport, + test_no_strings[i]); + } torture_suite_add_simple_test(suite, "parsing results", test_parse_check_results); |