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

CommandLineSettingTest is never executed #426

Closed
sophokles73 opened this issue Jan 13, 2025 · 6 comments
Closed

CommandLineSettingTest is never executed #426

sophokles73 opened this issue Jan 13, 2025 · 6 comments
Assignees

Comments

@sophokles73
Copy link
Contributor

The core/src/test/java/org/eclipse/dash/licenses/tests/TestSuite.java defines the test suite to be run as all class files ending in Tests.

This results in the tests defined in CommandLineSettingTest.java never being run. However, running the tests manually reveals that they fail for the current code base.

@waynebeaton waynebeaton self-assigned this Jan 13, 2025
@waynebeaton
Copy link
Collaborator

Well that's embarrassing... I'll have a look.

@sophokles73
Copy link
Contributor Author

I have taken a look at the whole command line parsing which is currently based on the (rather inept) Apache Commons CLI library. IMHO we could save a lot of manual coding if we used something more capable like picocli. Or is there any compelling reason why we would need to stick with Commons CLI? If not, I guess I could give it a shot...

@waynebeaton
Copy link
Collaborator

There was no specific compelling reason behind the selection of Apache Commons CLI.

One thing that's bothered me about the implementation of the settings is that it tightly couples components that are otherwise more loosely coupled. It's possible to, for example, create a configuration of the Dash License Tool that drops ClearlyDefined support or IPLab integration, but the configuration of them will still be in the settings. I've thus far avoided attempting to refactor any of that because I expect that it will introduce unnecessary complexity.

@waynebeaton
Copy link
Collaborator

The errors are a result of some housekeeping that I did last week (see #427). Had the tests been included in the suite, I'd have noticed the error. I'll reverse those, and add CommandLineSettingTest to the test suite. This should clean up the errors.

@waynebeaton
Copy link
Collaborator

3ce24e0 changes the name from CommandLineSettingTest to CommonLineSettingTests to ensure that the tests are run. The errors introduced by the previous commit have been reverted. The tests should run clean now.

@waynebeaton
Copy link
Collaborator

I've pushed further update that correctly configure the batch, confidence, and timeout options as Integer.class.

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

No branches or pull requests

2 participants