-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce bal tool distribution tests
- Loading branch information
1 parent
dbdee63
commit 84e1233
Showing
30 changed files
with
1,048 additions
and
0 deletions.
There are no files selected for viewing
870 changes: 870 additions & 0 deletions
870
project-api-tests/src/test/java/org/ballerina/projectapi/BalToolTest.java
Large diffs are not rendered by default.
Oops, something went wrong.
18 changes: 18 additions & 0 deletions
18
project-api-tests/src/test/java/org/ballerina/projectapi/BuildTimeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 63 additions & 0 deletions
63
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-execute-general-help.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
NAME | ||
The build system and package manager of Ballerina | ||
|
||
SYNOPSIS | ||
bal <command> [args] | ||
bal [OPTIONS] | ||
|
||
|
||
OPTIONS | ||
-v, --version | ||
Print version information. | ||
|
||
-h, --help | ||
Print the usage details of a command. | ||
|
||
|
||
COMMANDS | ||
The available subcommands are: | ||
|
||
Core Commands: | ||
build Compile the current package | ||
run Compile and run the current package | ||
test Run package tests | ||
doc Generate current package's documentation | ||
pack Create distribution format of the current package | ||
|
||
Package Commands: | ||
new Create a new Ballerina package | ||
add Add a new Ballerina module to the current package | ||
pull Pull a package from Ballerina Central | ||
push Publish a package to Ballerina Central | ||
search Search Ballerina Central for packages | ||
semver Show SemVer compatibility and local package changes against | ||
published packages in Ballerina Central | ||
graph Print the dependency graph in the console | ||
deprecate Deprecate a package in Ballerina Central | ||
|
||
Other Commands: | ||
clean Clean the artifacts generated during the build | ||
format Format Ballerina source files | ||
grpc Generate the Ballerina sources for a given Protocol | ||
Buffer definition | ||
graphql Generate the Ballerina client sources for a GraphQL config file, | ||
generate the GraphQL schema for a Ballerina GraphQL service, and | ||
generate the Ballerina GraphQL service for a GraphQL schema | ||
openapi Generate the Ballerina sources for a given OpenAPI | ||
definition and vice versa | ||
asyncapi Generate the Ballerina sources for a given AsyncAPI definition | ||
persist Manage data persistence | ||
bindgen Generate the Ballerina bindings for Java APIs | ||
shell Run Ballerina interactive REPL [Experimental] | ||
tool Manage Ballerina CLI tools | ||
version Print the Ballerina version | ||
profile Start Ballerina Profiler [Experimental] | ||
|
||
Tool Commands: | ||
disttest The tool implementation for ballerina distribution tool tests | ||
|
||
Update Commands: | ||
dist Manage Ballerina distributions | ||
update Update the Ballerina tool | ||
|
||
Use 'bal help <command>' for more information on a specific command. |
8 changes: 8 additions & 0 deletions
8
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-execute-specific-help.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Sample tool used for testing the bal tools in ballerina distribution tests. | ||
bal disttest <arg1> | ||
|
||
--args-- | ||
<arg1> | ||
The argument to be printed. | ||
|
||
version: 1.1.0 |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-execute-tool.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist test command 1.1.0 is executing with args arg1 |
4 changes: 4 additions & 0 deletions
4
...i-tests/src/test/resources/bal-tool/cmd-outputs/tool-list-with-multiple-tool-versions.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|TOOL ID |VERSION | | ||
|----------------------|----------------| | ||
|disttest | 1.1.0 | | ||
|disttest |* 1.0.0 | |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-list-with-no-tools.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
no tools found locally. |
2 changes: 2 additions & 0 deletions
2
...i-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-again-with-specific-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tool 'disttest:1.0.0' is already available locally. | ||
tool 'disttest:1.0.0' is already active. |
2 changes: 2 additions & 0 deletions
2
...ect-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-again-without-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tool 'disttest:1.1.0' is already available locally. | ||
tool 'disttest:1.1.0' is already active. |
1 change: 1 addition & 0 deletions
1
...ct-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-with-incompatible-dist.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest:1.0.4' is not compatible with the current Ballerina distribution |
1 change: 1 addition & 0 deletions
1
...api-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-with-non-existing-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
unexpected error occurred while pulling tool:error: tool not found for: disttest:1.0.3 |
2 changes: 2 additions & 0 deletions
2
...ect-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-with-specific-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tool 'disttest:1.0.0' pulled successfully. | ||
tool 'disttest:1.0.0' successfully set as the active version. |
2 changes: 2 additions & 0 deletions
2
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-pull-without-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
tool 'disttest:1.1.0' pulled successfully. | ||
tool 'disttest:1.1.0' successfully set as the active version. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-active-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: cannot remove active tool 'disttest:1.1.0'. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-all.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest' successfully removed. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-non-existing-tool.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest2' not found. |
1 change: 1 addition & 0 deletions
1
...ct-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-non-existing-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest:1.0.3' not found. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-specific-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest:1.0.0' successfully removed. |
1 change: 1 addition & 0 deletions
1
...-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-remove-with-incompatible-dist.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest:1.0.4' is not compatible with the current Ballerina distribution |
6 changes: 6 additions & 0 deletions
6
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-search-with-tool-id.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Ballerina Central | ||
================= | ||
|
||
|ID |PACKAGE |DESCRIPTION |DATE |VERSION | | ||
|------------|-------------|-------------|----------------|-------------| | ||
|disttest |bctestorg... |Sample to... |2023-09-12-Tue |1.1.0 | |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-update-non-existing.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest2' is not installed. |
3 changes: 3 additions & 0 deletions
3
...pi-tests/src/test/resources/bal-tool/cmd-outputs/tool-update-with-new-patch-and-minor.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bctestorg/disttest:1.1.0 pulled from central successfully | ||
tool 'disttest:1.1.0' pulled successfully. | ||
tool 'disttest:1.1.0' successfully set as the active version. |
1 change: 1 addition & 0 deletions
1
...ect-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-update-with-no-new-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest' is already up-to-date. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-use-active-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest:1.0.0' is the current active version. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-use-new-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest:1.1.0' successfully set as the active version. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-use-non-existent-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest:1.0.3' is not found. Run 'bal tool pull disttest:1.0.3' to fetch and set as the active version. |
1 change: 1 addition & 0 deletions
1
project-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-use-old-version.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tool 'disttest:1.0.0' successfully set as the active version. |
1 change: 1 addition & 0 deletions
1
...ect-api-tests/src/test/resources/bal-tool/cmd-outputs/tool-use-with-incompatible-dist.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ballerina: tool 'disttest:1.0.4' is not compatible with the current Ballerina distribution |