Repository navigation
SOLR-18566: Fixing BATs for PicoCLI migration #5204
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
base: main
Are you sure you want to change the base?
Changes from all commits
205ef9a
c8ce02c
68d4040
71c7457
65dcfa1
f996536
458e920
6da4ab2
594b5b3
4817af8
d39804f
28beecb
681677a
193756d
a0071f0
4d7faad
e3e6db5
ed39884
bbf4922
d442324
ccd96d8
b5314f5
4cf5ad5
8679d8d
7eb288a
dc61d00
1fa1472
1af8443
9f1df2c
40a85dd
adc8ba0
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| title: > | ||
| All BATs Integration Tests now run against the picocli CLI | ||
| type: fixed | ||
| authors: | ||
| - name: Jalaz Kumar | ||
| nick: jaykay12 | ||
| links: | ||
| - name: SOLR-18566 | ||
| url: https://issues.apache.org/jira/browse/SOLR-18566 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,38 +23,39 @@ setup() { | |
|
|
||
| @test "solr help flag prints help" { | ||
| run -1 solr --help | ||
| assert_output --partial 'Usage: solr COMMAND OPTIONS' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i know we are doing "the right thing", but a part of me just wishes we removed the commons-cli testing at this point... but this is "the right way"...
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, this is to facilitate a smoother migration. |
||
| assert_output_for_cli 'Usage: solr COMMAND OPTIONS' 'usage: bin/solr' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
| @test "solr with no flags prints help" { | ||
| run -1 solr | ||
| assert_output --partial 'Usage: solr COMMAND OPTIONS' | ||
| assert_output_for_cli 'Usage: solr COMMAND OPTIONS' 'usage: bin/solr' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
| @test "start help flag prints help" { | ||
| run solr start --help | ||
| assert_output --partial 'Usage: solr start' | ||
| assert_output_for_cli 'Usage: solr start' 'usage: bin/solr start' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
| @test "start h flag prints help" { | ||
| run solr start -h | ||
| assert_output --partial 'Usage: solr start' | ||
| assert_output_for_cli 'Usage: solr start' 'usage: bin/solr start' | ||
| refute_output --partial 'ERROR: Hostname is required when using the -h option!' | ||
| } | ||
|
|
||
|
|
||
|
|
||
| @test "stop help flag prints help" { | ||
| run solr stop --help | ||
| assert_output --partial 'Usage: solr stop' | ||
| assert_output_for_cli 'Usage: solr stop' 'usage: bin/solr stop' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
| @test "restart help flag prints help" { | ||
| [ -z "${SOLR_PICOCLI:-}" ] || skip "restart is not migrated to picocli yet" | ||
| run solr restart --help | ||
| assert_output --partial 'Usage: solr restart' | ||
| assert_output_for_cli 'Usage: solr restart' 'usage: bin/solr restart' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
|
|
@@ -85,13 +86,13 @@ setup() { | |
| @test "zk help flag prints help" { | ||
| run solr zk --help | ||
| assert_output --partial 'usage:' | ||
| assert_output --partial 'bin/solr zk ls' | ||
| assert_output_for_cli 'bin/solr zk ls' 'usage: bin/solr zk' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
| @test "auth help flag prints help" { | ||
| run solr auth --help | ||
| assert_output --partial 'bin/solr auth enable' | ||
| assert_output_for_cli 'bin/solr auth enable' 'usage: bin/solr auth' | ||
| refute_output --partial 'ERROR' | ||
| } | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,8 +34,8 @@ See xref:cli/index.adoc[] to enable this implementation and for its known limita | |
|
|
||
| .... | ||
| bin/solr auth [-hv] --auth-conf-dir=DIR [--block-unknown=true|false] | ||
| [--prompt=true|false] [-s=<solrConnection>] --solr-include-file=FILE | ||
| [--solr-url=<solrUrl>] [--type=TYPE] [-u=<credentials>] | ||
| [--prompt=true|false] [-s=<solrConnection>] [--solr-url=<solrUrl>] | ||
| [--type=TYPE] [-u=<credentials>] | ||
| [--update-include-file-only=true|false] [-z=<zkHost>] enable|disable | ||
| .... | ||
|
|
||
|
|
@@ -66,9 +66,6 @@ Updates or enables/disables authentication. Must be run on the Solr server itsel | |
| *-s*, *--solr-connection*=_<solrConnection>_:: | ||
| Zookeeper or HTTP(s) connection string; unnecessary if SOLR_CONNECTION is defined in solr.in.sh; otherwise, defaults to localhost:9983. | ||
|
|
||
| *--solr-include-file*=_FILE_:: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why can't we just keep this? Or is this just a property that no one uses, so we simplifeid by making it a system property?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. i am not fully confident on this aspect, will try digging more here. |
||
| *(required)* The Solr include file which contains overridable environment variables for configuring Solr configurations. Defaults to solr.in.sh or solr.in.cmd. | ||
|
|
||
| *--solr-url*=_<solrUrl>_:: | ||
| Base Solr URL, which can be used to determine the zk-host if --zk-host is not known | ||
|
|
||
|
|
||
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.
if the way to pass this setting in is via a system property, that maybe begs teh question why do we have the parameter at all?
Uh oh!
There was an error while loading. Please reload this page.
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.
not fully sure about this aspect as of now. will have to dig little deeper here.