22 Commits

Author SHA1 Message Date
Janne Valkealahti
c27b85fb0e Split sample app
- spring-shell-sample-commands and spring-shell-sample-e2e
- Needed changes in e2e tests and workflow
- Fixes #754
2023-06-15 10:49:52 +01:00
Janne Valkealahti
f2a48a061d Test help command with e2e tests
- Fixes #756
2023-06-02 06:19:12 +01:00
Janne Valkealahti
90010a94ea Fix e2e tests
- As one command name was changed
2023-01-16 21:12:17 +00:00
Janne Valkealahti
b555148ce9 Fix assert in flow e2e test
- Fix assert by checking plain ">" if env CI variable is not set.
- Fixes #576
2022-11-30 17:27:48 +00:00
Janne Valkealahti
0899d414de Build linux sample with musl
- Change sample build to use musl on linux
- Optionally remove version from jar so that
  e2e tests don't need to use version in path.
- Add better matrix to e2e so that we're able to
  build on one OS and then test with others.
- Fixes #576
2022-11-30 15:39:10 +00:00
Janne Valkealahti
a900fa4977 Fix e2e tests
- Due to changes in #567 e2e tests started to fail as
  args where passed with spaces instead of args array.
- Fix all args use so that spawn underneath uses
  plain array with proper args.
2022-11-25 09:03:20 +00:00
Janne Valkealahti
4c48017a97 Implement more flexible error handling
- Add exception handling around new interface CommandExceptionResolver
  which allows to define a chain of resolvers to process errors before
  exception is bubbled up to result handlers.
- Will be foundation to add more sophisticated error handling features
  compared to what spring itself have for rest layer.
- Resolver returns CommandHandlingResult holder which further can be
  used to make a choice what to print into console and if spesific exit
  code should be used in non-interactive mode.
- Exception handling can be defined globally and per command giving
  a change for user to customise i.e. error thrown by parser.
- CommandParserExceptionResolver replaces CommandParserExceptionsExceptionResultHandler
  and provides more meaninful message for missing options.
- Fixes #503
2022-10-14 10:55:05 +01:00
Janne Valkealahti
212ee43989 Change e2e tests for gradle changes
- Fix e2e workflow to build with gradle.
- Fix e2e paths to ones generated by gradle.
- Relates #470
2022-08-17 08:52:19 +01:00
Janne Valkealahti
e193ca1d24 Upgrade to Boot 3.x
- For now port spring-native to framework config.
- 3rd party configs should go somewhere else.
- Fix changes from javax to jakarta.
- Change java settings as we now require jdk 17.
- Fixes #385
2022-07-24 08:07:14 +01:00
Janne Valkealahti
643b189fb8 Default boolean arg to false
- In a case where arg is given as boolean and with plain
  @ShellOption (user doesn't define defaults), configure
  arg not to be mandatory and with default value false.
- This brings this spesific case more close how it behave
  in older shell version.
- Having `@ShellOption boolean arg1` it now works as:
    my-shell:>e2e reg default-value-boolean3
    Hello false
    my-shell:>e2e reg default-value-boolean3 --arg1
    Hello true
    my-shell:>e2e reg default-value-boolean3 --arg1 false
    Hello false
    my-shell:>e2e reg default-value-boolean3 --arg1 true
    Hello true
- Fixes #461
2022-07-18 12:41:23 +03:00
Janne Valkealahti
341a69e6e0 Add e2e test for command help 2022-06-15 18:47:06 +01:00
Janne Valkealahti
fa8693901f Add e2e results
- Going via jest-junit to xml and then with
  publish-unit-test-result-action to publish results.
2022-06-03 09:39:17 +01:00
Janne Valkealahti
0e37989a6f e2e test for required option value 2022-06-02 09:58:16 +01:00
Janne Valkealahti
3891a8b375 Add support for exit codes
- New configurations to CommandRegistration
- Re-using exit code concepts from boot
- Handling exit codes only in non-interactive mode
- Adding e2e commands and tests for better coverage
- Fixes #431
2022-05-31 07:49:50 +01:00
Janne Valkealahti
b119473881 New e2e test 2022-05-18 08:01:24 +01:00
Janne Valkealahti
7224ee31de Update e2e tests
- Add new e2e group to samples which can be used
  with particular tests.
- Relates #401
2022-05-15 16:29:48 +01:00
Janne Valkealahti
1a1864f8c5 Update e2e tests
- Tweak things on win for settings combinations which might
  work with all trouble you're getting from win versions and
  node-pty, etc.
- Relates #401
2022-05-10 09:42:00 +01:00
Janne Valkealahti
8af3bd892e Change e2e timeouts
- Relates #401
2022-05-08 14:41:59 +01:00
Janne Valkealahti
c6a8e1c65c Update e2e tests
- Fix native configs for win in sample app.
- Integrate spring-native with samples app.
- Tweak e2e workflow to upload artifacts and some other generic changes.
- Relates #401
2022-05-08 14:19:35 +01:00
Janne Valkealahti
6d39c2b059 Change e2e timeouts
- Relates #401
2022-05-08 08:13:54 +01:00
Janne Valkealahti
d05d829a6f Change e2e timeouts
- Relates #401
2022-05-08 07:53:47 +01:00
Janne Valkealahti
3743a7f32d Initial attempt for e2e tests
- Add node code for e2e tests. This is a first take to try running
  these tests via actions.
- Relates to #401
2022-05-07 17:51:51 +01:00