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

@CommandScan does not include commands during testing #1011

Closed
Andras-Csanyi opened this issue Feb 25, 2024 · 1 comment
Closed

@CommandScan does not include commands during testing #1011

Andras-Csanyi opened this issue Feb 25, 2024 · 1 comment
Labels
status/duplicate There were an existing issue

Comments

@Andras-Csanyi
Copy link

Andras-Csanyi commented Feb 25, 2024

Summary

@CommandScan does not work in testing, but @EnableCommand works

Case 1:

  • this application works as expected
  • test is available here
  • the commands are available and the component does what is expected from it, meaning loaded via Spring Boot

Case 2:

  • modify this application in a way described below:
- @EnableCommand(FooCommand.class)
+ @CommandScan
@SpringBootApplication
public class SpringshellApplication {
    
    public static void main(String[] args) {
        SpringApplication.run(SpringshellApplication.class, args);
    }
    
}
  • execute the test linked above
  • observe the result which does not lists the available commands

Expected result:

  • during testing both annotation should provide what is expected from it

If you can give me a few pointers where to look for I am ok to take a look at it and provide a fix.

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Feb 25, 2024
@jvalkeal
Copy link
Contributor

This is related/duplicate of #738 and #721. I'm in favour of closing?

@jvalkeal jvalkeal added status/duplicate There were an existing issue and removed status/need-triage Team needs to triage and take a first look labels Feb 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/duplicate There were an existing issue
Projects
None yet
Development

No branches or pull requests

2 participants