-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Tests for plugins #25
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of your changes work.
But there are a few tests that don't work for me in those files - unrelated to your changes. Could you check those?
TestGetRawLogs
in plugins/logs/dao_test.go
TestGetRawOwnerPermissions
in plugins/permissions/dao_test.go
TestGetUser
and TestDeleteUser
in plugins/users/dao_test.go
@jeet-parekh I am working on it. Still, the issue isn't completely solved. I will complete it within 4 days |
@jeet-parekh I have fixed all the tests except 1 case in |
@harsh-2711, I'll take a closer look soon.
|
@harsh-2711, In |
@jeet-parekh Done. I missed that 😔 |
Yes. It's confusing why ES is not returning any type missing error when Search is made without any type. |
@harsh-2711, @siddharthlatest, It says that |
I think I figured it out. ES7 works the way it should. But I think we are using mocks for testing. Right? Inside each |
@jeet-parekh Thanks for help. I'll do it. |
@jeet-parekh I am not getting any response after making a request using function response, err := es.client.Search(es.indexName).
Query(query).
From(offset).
Size(s).
Sort("timestamp", false).
Do(ctx) The function is returning error after this point |
@harsh-2711, is it the same error as before? |
Yes |
strange, those errors disappeared for me after this ☝️ |
Can you add the changes in this branch? I'll test them once. Because they aren't working for me |
sure |
@harsh-2711, I pushed a change which solves
|
Done👍🏻 Thanks @jeet-parekh |
@harsh-2711, no worries... so only |
@harsh-2711, @siddharthlatest, could this be the reason? |
@jeet-parekh Not sure of the context. Reason for what? This line does look problematic for ES v7: https://github.com/appbaseio/arc/pull/25/files#diff-44bc5029f965a2bfbec785db82de0f39R201. |
@siddharthlatest,
I was looking for a reason for that. And that link is the closest thing I found. You know better about ES. What do you think? |
@harsh-2711, try Siddharth's suggestion |
@jeet-parekh All tests are passing now. Please take a look. |
The tests work fine. Could you check and correct the Other than that, it LGTM. |
@jeet-parekh Test headers are changed now |
closing this, as we have moved to using end-to-end tests instead of mock tests. |
What does this do / why do we need it?
The PR fixes the getTotalNodes permission test which was failing due to the version change of es from 6.x to 7.x
What should your reviewer look out for in this PR?
The path in server setup struct on which the query is tested
Do you need help or clarification on anything?
No
Which issue(s) does this PR fix?
#16