mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-04-14 06:06:44 +00:00
added test to make sure that DNA lookups by number work as advertised.
This commit is contained in:
parent
0254ca0ab8
commit
a4d575d87a
@ -105,5 +105,25 @@ test_DNAWildcardSearchFindsSelfEmpty() {
|
||||
assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$"
|
||||
}
|
||||
|
||||
doc_DNASpecificLookup="DNA Lookup by phone number"
|
||||
setup_DNASpecificLookup() {
|
||||
setup
|
||||
}
|
||||
test_DNASpecificLookup() {
|
||||
setup_servald_instances
|
||||
set_instance A
|
||||
# Make sure we get no false positives
|
||||
executeOk_servald dna lookup "5551234"
|
||||
assertStdoutLineCount '==' 0
|
||||
executeOk_servald dna lookup "555000"
|
||||
assertStdoutLineCount '==' 0
|
||||
executeOk_servald dna lookup "55500011"
|
||||
assertStdoutLineCount '==' 0
|
||||
# Make sure we get the right results, and no duplicates
|
||||
executeOk_servald dna lookup "5550001"
|
||||
assertStdoutLineCount '==' 2
|
||||
assertStdoutGrep --matches=1 "^sid://$SIDA/5550001:5550001:Agent A Smith$"
|
||||
assertStdoutGrep --matches=1 "^sid://$SIDB/5550001:5550001:Agent B Smith$"
|
||||
}
|
||||
|
||||
runTests "$@"
|
||||
|
Loading…
x
Reference in New Issue
Block a user