-
Notifications
You must be signed in to change notification settings - Fork 54
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
Default configuration for tedge operation plugins #2637
Default configuration for tedge operation plugins #2637
Conversation
Codecov ReportAttention:
Additional details and impacted files
|
Robot Results
|
tests/RobotFramework/tests/cumulocity/configuration/configuration_operation.robot
Outdated
Show resolved
Hide resolved
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.
Approved
e40fa60
to
cf2e972
Compare
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.
I confirm my approval, after the changes to generate config examples using the config directory set with --config-dir
.
"{}/plugins/tedge-log-plugin.toml", | ||
tempdir.path().to_string_lossy() | ||
); | ||
let expected_config = toml::toml! { |
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.
I don't think this test is helpful: the expected_config is built using exactly the same code as by the unit under test.
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.
I added this test just to make sure that any future changes to the default config are also always tested. Since the paths used are dynamic (derived from the temp directory), I had no choice but to use a similar mechanism to generate the expected configs as well.
let plugin_config_toml: Table = from_str(&plugin_config_content).unwrap(); | ||
|
||
let agent_logs_path = format!("{}/agent/software-*", tempdir.path().to_string_lossy()); | ||
let expected_config = toml! { |
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.
Is this test helpful? The expected and actual values are built using a copy of the same code.
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.
Same comment as above.
bacce8b
to
6bb5198
Compare
Proposed changes
Provide default plugin configurations for
tedge-config-plugin
andtedge-log-plugin
that'll work with both main and child devices.Types of changes
Paste Link to the issue
#2447
Checklist
cargo fmt
as mentioned in CODING_GUIDELINEScargo clippy
as mentioned in CODING_GUIDELINESFurther comments