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

Nidx node tests #2602

Merged
merged 9 commits into from
Nov 7, 2024
Merged

Nidx node tests #2602

merged 9 commits into from
Nov 7, 2024

Conversation

javitonino
Copy link
Contributor

@javitonino javitonino commented Nov 7, 2024

Settings changes

  • Switch config from envy/serde-with to config-rs. The previous setup was a bit annoying to work with and numeric fields (such as in merge settings) were not working due to Serde flatten softprops/envy#26.
  • Put the metadata connection in the settings. This makes it much easier to work with the sqlx::tests because they can create the db pool but don't have access to a db connection string. This way we have a single pool when running all components locally which is a better than starting 5 pools (per component).
  • Breaking change: Env variables are now separated by __. This is to better support nested structs with fields with underscore in their names.

Grpc changes

  • Expose Grpc servers so they can be started by the test fixture.
  • Allow setting a random port for the grpc server (and returning it). This means that starting it is a two step operation (1. reserve and get port, 2. start the serving task). This is wrapped in a GrpcServer struct.

Test changes

  • Added a fixture that starts API services in order to test. Still very much WIP, to be extended as we migrate more tests.

Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.15%. Comparing base (7066f03) to head (e4fd12a).
Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2602      +/-   ##
==========================================
- Coverage   86.19%   86.15%   -0.04%     
==========================================
  Files         376      376              
  Lines       23580    23580              
==========================================
- Hits        20325    20316       -9     
- Misses       3255     3264       +9     
Flag Coverage Δ
nucliadb 73.56% <ø> (-0.04%) ⬇️
nucliadb-ingest 28.88% <ø> (ø)
nucliadb-reader 24.90% <ø> (+0.01%) ⬆️
nucliadb-search 37.61% <ø> (ø)
nucliadb-standalone 46.88% <ø> (ø)
nucliadb-train 44.97% <ø> (ø)
nucliadb-writer 39.43% <ø> (ø)
nucliadb_dataset 55.45% <ø> (ø)
nucliadb_models 85.04% <ø> (ø)
nucliadb_sdk 80.11% <ø> (ø)
nucliadb_sidecar 89.03% <ø> (ø)
nucliadb_telemetry 86.55% <ø> (ø)
nucliadb_utils 84.36% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

nidx/src/api.rs Outdated Show resolved Hide resolved
Co-authored-by: Joan Antoni RE <[email protected]>
@javitonino javitonino merged commit 015c31d into dev Nov 7, 2024
11 checks passed
@javitonino javitonino deleted the nidx_node_tests branch November 7, 2024 14:06
javitonino added a commit that referenced this pull request Nov 7, 2024
javitonino added a commit that referenced this pull request Nov 8, 2024
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