Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
user-discovery-bot
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
archives
user-discovery-bot
Commits
391f6391
Commit
391f6391
authored
Aug 28, 2019
by
Josh Brooks
Browse files
Options
Downloads
Patches
Plain Diff
Attempt #2 to bump coverage
parent
44da6ce9
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
udb/register_test.go
+1
-0
1 addition, 0 deletions
udb/register_test.go
udb/search_test.go
+20
-0
20 additions, 0 deletions
udb/search_test.go
with
21 additions
and
0 deletions
udb/register_test.go
+
1
−
0
View file @
391f6391
...
...
@@ -145,6 +145,7 @@ func TestInvalidRegistrationCommands(t *testing.T) {
"REGISTER EMAIL garbage this is a garbage"
,
"REGISTER EMAIL rick@elixxir 8oKh7TYG4KxQcBAymoXPBHSD/uga9pX3Mn/jKh"
+
"vcD8M="
,
}
msg
:=
NewMessage
(
msgs
[
0
],
cmixproto
.
Type_UDB_PUSH_KEY
)
...
...
This diff is collapsed.
Click to expand it.
udb/search_test.go
+
20
−
0
View file @
391f6391
...
...
@@ -26,6 +26,26 @@ func TestSearchHappyPath(t *testing.T) {
sl
.
Hear
(
msg
,
false
)
}
func
TestSearch_InvalidArgs
(
t
*
testing
.
T
)
{
// Load a user
TestRegisterHappyPath
(
t
)
// NOTE: This is kind of hard, since we can't see the response and search
// does not modify data we can check
// TODO: Monkeypatch send so we can verify? -- this is tested in integration,
// so.. low priority.
msgs
:=
[]
string
{
"EMAIL rick@elixxir.io"
,
"GETKEY MORETHAN 1ARG"
,
}
msg
:=
NewMessage
(
msgs
[
0
],
cmixproto
.
Type_UDB_SEARCH
)
sl
.
Hear
(
msg
,
false
)
msg
=
NewMessage
(
msgs
[
1
],
cmixproto
.
Type_UDB_SEARCH
)
sl
.
Hear
(
msg
,
false
)
}
// Test invalid search type
func
TestSearch_Invalid_Type
(
t
*
testing
.
T
)
{
fingerprint
:=
"8oKh7TYG4KxQcBAymoXPBHSD/uga9pX3Mn/jKhvcD8M="
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment