Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Q
query-service
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GraphPolaris
Microservices
query-service
Commits
5633c6b0
Commit
5633c6b0
authored
3 years ago
by
Bouma,C.J. (Chris)
Browse files
Options
Downloads
Patches
Plain Diff
Mocks :)
:)
parent
b6f554f3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
internal/usecases/consume/consume_test.go
+1
-1
1 addition, 1 deletion
internal/usecases/consume/consume_test.go
internal/usecases/request/mock/mockrequest.go
+0
-1
0 additions, 1 deletion
internal/usecases/request/mock/mockrequest.go
with
1 addition
and
2 deletions
internal/usecases/consume/consume_test.go
+
1
−
1
View file @
5633c6b0
...
@@ -86,7 +86,7 @@ func TestHandleCorrectMessage(t *testing.T) {
...
@@ -86,7 +86,7 @@ func TestHandleCorrectMessage(t *testing.T) {
var
resultMessage
map
[
string
]
interface
{}
var
resultMessage
map
[
string
]
interface
{}
json
.
Unmarshal
(
mockBroker
.
Messages
[
mockQueue
][
1
]
.
Body
,
&
resultMessage
)
json
.
Unmarshal
(
mockBroker
.
Messages
[
mockQueue
][
1
]
.
Body
,
&
resultMessage
)
assert
.
Equal
(
t
,
"query_result"
,
resultMessage
[
"type"
])
assert
.
Equal
(
t
,
"query_result"
,
resultMessage
[
"type"
])
assert
.
E
mpty
(
t
,
resultMessage
[
"values"
])
assert
.
E
qual
(
t
,
"test"
,
resultMessage
[
"values"
])
}
}
// Unit test message received with no session ID
// Unit test message received with no session ID
...
...
This diff is collapsed.
Click to expand it.
internal/usecases/request/mock/mockrequest.go
+
0
−
1
View file @
5633c6b0
...
@@ -19,7 +19,6 @@ func NewService() *Service {
...
@@ -19,7 +19,6 @@ func NewService() *Service {
// SendAQLQuery sends the query to arangoDB and parses the result (mock)
// SendAQLQuery sends the query to arangoDB and parses the result (mock)
func
(
s
*
Service
)
SendAQLQuery
(
query
string
,
username
string
,
password
string
,
hostname
string
,
port
int
,
database
string
)
(
*
[]
byte
,
error
)
{
func
(
s
*
Service
)
SendAQLQuery
(
query
string
,
username
string
,
password
string
,
hostname
string
,
port
int
,
database
string
)
(
*
[]
byte
,
error
)
{
//mockResult := make(map[string][]entity.Document)
mockResult
,
_
:=
json
.
Marshal
(
"test"
)
mockResult
,
_
:=
json
.
Marshal
(
"test"
)
if
!
s
.
throwError
{
if
!
s
.
throwError
{
...
...
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