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

Validate config before usage #1805

Merged
merged 4 commits into from
Sep 27, 2022
Merged

Conversation

fyrchik
Copy link
Contributor

@fyrchik fyrchik commented Sep 20, 2022

We need this for #1770 .
Related #1764.

The list of checks will be extended. Currently only storage section is supported, as the most important one.

Copy link
Member

@carpawell carpawell left a comment

Choose a reason for hiding this comment

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

tests have died

@@ -26,7 +28,7 @@ func (x *Config) Storages() []*storage.Config {
switch typ {
case "":
return ss
case "fstree", "blobovnicza":
case fstree.Type, blobovniczatree.Type:
Copy link
Member

Choose a reason for hiding this comment

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

maybe "TypeName"? i read it as a type name, not a var name, and was confused for a second about how that even was compiled and whether it is a type switch

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The intention was to make it similar to a Type method for a storage component.

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
@codecov
Copy link

codecov bot commented Sep 26, 2022

Codecov Report

Merging #1805 (272ab51) into master (898689e) will decrease coverage by 2.65%.
The diff coverage is 35.82%.

@@            Coverage Diff             @@
##           master    #1805      +/-   ##
==========================================
- Coverage   33.45%   30.80%   -2.66%     
==========================================
  Files         352      372      +20     
  Lines       23969    26105    +2136     
==========================================
+ Hits         8020     8041      +21     
- Misses      15283    17388    +2105     
- Partials      666      676      +10     
Impacted Files Coverage Δ
cmd/neofs-node/config.go 0.00% <0.00%> (ø)
cmd/neofs-node/main.go 0.00% <0.00%> (ø)
...ct_storage/blobstor/blobovniczatree/blobovnicza.go 60.75% <0.00%> (ø)
pkg/local_object_storage/blobstor/fstree/fstree.go 68.26% <0.00%> (ø)
cmd/neofs-node/validate.go 46.66% <46.66%> (ø)
cmd/neofs-node/config/engine/config.go 92.00% <60.00%> (-8.00%) ⬇️
cmd/neofs-node/worker.go 0.00% <0.00%> (ø)
cmd/neofs-node/reputation.go 0.00% <0.00%> (ø)
cmd/neofs-node/timers.go 0.00% <0.00%> (ø)
cmd/neofs-node/notificator.go 0.00% <0.00%> (ø)
... and 15 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@fyrchik fyrchik merged commit 59de20f into nspcc-dev:master Sep 27, 2022
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.

3 participants