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

feat(gnodev): add node tests and lint #1668

Merged
merged 19 commits into from
Apr 29, 2024
Merged

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Feb 19, 2024

Add some basic tests to node and emitter packages from gnodev to prevent regression.
I also made the node thread-safe during the process as it was necessary to test the node.

Edit: Added linting, as golangci-lint was ignoring gnodev directory.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@gfanton gfanton self-assigned this Feb 19, 2024
@gfanton gfanton changed the title feat(gnodev): add tests feat(gnodev): add node tests Feb 19, 2024
Copy link

codecov bot commented Feb 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 48.36%. Comparing base (f660be5) to head (52a2982).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1668      +/-   ##
==========================================
+ Coverage   46.63%   48.36%   +1.73%     
==========================================
  Files         492      409      -83     
  Lines       69624    62035    -7589     
==========================================
- Hits        32472    30006    -2466     
+ Misses      34445    29531    -4914     
+ Partials     2707     2498     -209     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
…thread safe

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton marked this pull request as ready for review April 10, 2024 21:17
@gfanton gfanton requested review from moul and a team as code owners April 10, 2024 21:17
@zivkovicmilos zivkovicmilos self-requested a review April 11, 2024 07:01
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton changed the title feat(gnodev): add node tests feat(gnodev): add node tests and lint Apr 22, 2024
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Copy link
Member

@zivkovicmilos zivkovicmilos left a comment

Choose a reason for hiding this comment

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

Looks good 💯

I've left some comments, mostly nits. Otherwise good to go 🚀

contribs/gnodev/go.mod Outdated Show resolved Hide resolved
contribs/gnodev/pkg/dev/node.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/dev/node.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/dev/node_test.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/dev/node_test.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/emitter/server_test.go Show resolved Hide resolved
contribs/gnodev/pkg/dev/node_test.go Show resolved Hide resolved
contribs/gnodev/pkg/emitter/server_test.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/emitter/server_test.go Outdated Show resolved Hide resolved
contribs/gnodev/pkg/events/events_custom.go Show resolved Hide resolved
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton merged commit 7bf662a into gnolang:master Apr 29, 2024
192 of 193 checks passed
@gfanton gfanton deleted the fix/gnodev-test branch April 29, 2024 10:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Status: No status
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants