Skip to content
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

NOISSUE - Fix Twins Tests #1931

Merged
merged 2 commits into from
Oct 20, 2023
Merged

NOISSUE - Fix Twins Tests #1931

merged 2 commits into from
Oct 20, 2023

Conversation

rodneyosodo
Copy link
Member

Signed-off-by: Rodney Osodo 28790446+rodneyosodo@users.noreply.github.com

What does this do?

Fix tests in twins package

Which issue(s) does this PR fix/relate to?

No issue

List any changes that modify/break current functionality

None

Have you included tests for your changes?

Yes

Did you document any new/modified functionality?

No

Notes

To be merged after https://github.com/mainflux/mainflux/pull/1927

@rodneyosodo rodneyosodo force-pushed the twins-test branch 6 times, most recently from 26a740b to f47389d Compare October 19, 2023 07:50
@rodneyosodo rodneyosodo marked this pull request as ready for review October 19, 2023 07:51
@rodneyosodo rodneyosodo requested a review from a team as a code owner October 19, 2023 07:51
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

This commit adds a new service constructor to the `twins/mocks/service.go` file. The new constructor, `NewService`, takes no arguments and returns an instance of `twins.Service` along with a mock instance of `authmocks.Service`. This allows for the creation of a real twins service using mock dependencies.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
This commit adds tests for the endpoint states API in the `endpoint_states_test.go` file. The tests cover the functionality of the `GET` and `POST` methods for retrieving and updating the states of endpoints respectively. The tests use the `mainflux` and `authmocks` packages for mocking and testing the API endpoints. Additionally, the `testsutil` package is imported for utility functions used in the tests.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
@drasko drasko merged commit 1f21541 into absmach:master Oct 20, 2023
1 of 2 checks passed
@rodneyosodo rodneyosodo deleted the twins-test branch October 22, 2024 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants