Rename dnaprotocol tests to assist filtering

This commit is contained in:
Andrew Bettison 2012-07-02 14:44:11 +09:30
parent 4516628c14
commit 5764a09b43

View File

@ -71,49 +71,47 @@ setup_servald_instances() {
assertStdoutLineCount '==' 1 assertStdoutLineCount '==' 1
} }
doc_MultipleServalDTest="Start two servald instances with dummy interface" doc_MultiServer="Start two servald instances with dummy interface"
setup_MultiServer() {
setup_MultipleServalDTest() {
setup setup
} }
test_MultiServer() {
test_MultipleServalDTest() {
setup_servald_instances setup_servald_instances
} }
doc_DNAWildcardSearchFindsSelf="DNA lookup of wildcard finds (star method)" doc_LookupWildcard="Lookup by wildcard"
setup_DNAWildcardSearchFindsSelf() { setup_LookupWildcard() {
setup setup
setup_servald_instances setup_servald_instances
set_instance +A set_instance +A
} }
test_DNAWildcardSearchFindsSelf() { test_LookupWildcard() {
executeOk_servald dna lookup "*" executeOk_servald dna lookup "*"
assertStdoutLineCount '==' 2 assertStdoutLineCount '==' 2
assertStdoutGrep --matches=1 "^sid://$SIDA/5550001:5550001:Agent A Smith$" assertStdoutGrep --matches=1 "^sid://$SIDA/5550001:5550001:Agent A Smith$"
assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$" assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$"
} }
doc_DNAWildcardSearchFindsSelfEmpty="DNA lookup of wildcard (empty query method)" doc_LookupEmpty="Lookup by empty string"
setup_DNAWildcardSearchFindsSelfEmpty() { setup_LookupEmpty() {
setup setup
setup_servald_instances setup_servald_instances
set_instance +A set_instance +A
} }
test_DNAWildcardSearchFindsSelfEmpty() { test_LookupEmpty() {
executeOk_servald dna lookup "" executeOk_servald dna lookup ""
assertStdoutLineCount '==' 2 assertStdoutLineCount '==' 2
assertStdoutGrep --matches=1 "^sid://$SIDA/5550001:5550001:Agent A Smith$" assertStdoutGrep --matches=1 "^sid://$SIDA/5550001:5550001:Agent A Smith$"
assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$" assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$"
} }
doc_DNASpecificLookup="DNA Lookup by phone number" doc_LookupNumber="Lookup by phone number"
setup_DNASpecificLookup() { setup_LookupNumber() {
setup setup
setup_servald_instances setup_servald_instances
set_instance +A set_instance +A
} }
test_DNASpecificLookup() { test_LookupNumber() {
# Make sure we get no false positives # Make sure we get no false positives
executeOk_servald dna lookup "5551234" executeOk_servald dna lookup "5551234"
assertStdoutLineCount '==' 0 assertStdoutLineCount '==' 0
@ -128,13 +126,13 @@ test_DNASpecificLookup() {
assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$" assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$"
} }
doc_DNANodeInfoLocalResolution="'node info' auto-resolves for local identities" doc_NodeinfoLocal="Node info auto-resolves for local identities"
setup_DNANodeInfoLocalResolution() { setup_NodeinfoLocal() {
setup setup
setup_servald_instances setup_servald_instances
set_instance +A set_instance +A
} }
test_DNANodeInfoLocalResolution() { test_NodeinfoLocal() {
# node info for a local identity returns DID/Name since it is free, even # node info for a local identity returns DID/Name since it is free, even
# if it isn't asked for. # if it isn't asked for.
executeOk_servald node info $SIDA executeOk_servald node info $SIDA
@ -143,13 +141,13 @@ test_DNANodeInfoLocalResolution() {
assertStdoutGrep --matches=0 "did-not-resolved" assertStdoutGrep --matches=0 "did-not-resolved"
} }
doc_DNANodeInfoRemoteResolution="'node info' for remote identities" doc_NodeinfoRemote="Node info resolves remote identities"
setup_DNANodeInfoRemoteResolution() { setup_NodeinfoRemote() {
setup setup
setup_servald_instances setup_servald_instances
set_instance +A set_instance +A
} }
test_DNANodeInfoRemoteResolution() { test_NodeinfoRemote() {
# if resolvedid is not specified for a remote identity, then don't resolve # if resolvedid is not specified for a remote identity, then don't resolve
# it. # it.
executeOk_servald node info $SIDB executeOk_servald node info $SIDB
@ -165,5 +163,4 @@ test_DNANodeInfoRemoteResolution() {
} }
runTests "$@" runTests "$@"