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

moduletest: add --config option #811

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kkanas
Copy link
Contributor

@kkanas kkanas commented Nov 15, 2024

This allows testing with varous osconfig.json and will remove need for file copy into /etc/

Description

Describe your changes in as much detail as possible. Provide a link/reference to the issue solved with this request if any.

Checklist

  • I have read the contribution guidelines.
  • All unit tests are passing.
  • I have merged the latest main branch prior to this PR submission.
  • I submitted this PR against the main branch.

This allows testing with varous osconfig.json and will remove need for
file copy into /etc/

Signed-off-by: Krzysztof Kanas <[email protected]>
@kkanas kkanas requested a review from a team as a code owner November 15, 2024 20:34
@@ -6,7 +6,7 @@
#include <math.h>

#define DEFAULT_BIN_PATH "/usr/lib/osconfig"
#define OSCONFIG_CONFIG_FILE "/etc/osconfig/osconfig.json"
#define DEFAULT_OSCONFIG_CONFIG_FILE "/etc/osconfig/osconfig.json"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why changing this?

@@ -56,7 +51,7 @@ jobs:

echo -n "testing $name ... "

if output=$(sudo ./moduletest $recipe --bin ../bin); then
if output=$(sudo ./moduletest $recipe --bin ../bin --config ../../src/adapters/pnp/daemon/osconfig.json ); then
Copy link
Contributor

Choose a reason for hiding this comment

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

../bin --config ../../src/adapters/pnp/daemon/osconfig.json

Why?

moduletest supports command line arguments, if invoked manually. We do not need more for now.

Can you please explain why do you believe this change is necessary and what needs is going to solve?

Thanks

@SethBe
Copy link

SethBe commented Nov 15, 2024

This would really help me as a reviewer.
in addition to the description, it would be really helpful to include the motivation for the change.
Typically in other projects, its required to have What the change is? Why the change is needed? and how it was validated in the description. I feel like we are just missing the why :).

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