Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openwhisk-runtime-python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Groundhog
openwhisk-runtime-python
Commits
1a657a08
Commit
1a657a08
authored
8 years ago
by
dubeejw
Committed by
Carlos Santana
8 years ago
Browse files
Options
Downloads
Patches
Plain Diff
WIP: Update Go CLI Package Argument Errors
- Display more information about invalid arguments
parent
35757468
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/src/system/basic/WskBasicTests.scala
+81
-0
81 additions, 0 deletions
tests/src/system/basic/WskBasicTests.scala
with
81 additions
and
0 deletions
tests/src/system/basic/WskBasicTests.scala
+
81
−
0
View file @
1a657a08
...
...
@@ -367,6 +367,87 @@ class WskBasicTests
stdout
should
not
include
regex
(
""""key": "xxx""""
)
}
it
should
"reject create of a package without a package name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"create"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name is required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject create of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"create"
,
"packageName"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject update of a package without a package name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"update"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name is required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject update of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"update"
,
"packageName"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject get of a package without a package name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"get"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name is required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject get of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"get"
,
"packageName"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject bind of a package without a package name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"bind"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name and binding name are required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject bind of a package without a binding name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"bind"
,
"somePackage"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name and binding name are required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject bind of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"bind"
,
"packageName"
,
"bindingName"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject list of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"list"
,
"namespace"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject delete of a package without a package name"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"delete"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s). A package name is required."
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject delete of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"delete"
,
"namespace"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
it
should
"reject refresh of a package with an invalid argument"
in
{
val
stderr
=
wsk
.
cli
(
Seq
(
"package"
,
"refresh"
,
"namespace"
,
"invalidArg"
),
expectedExitCode
=
ERROR_EXIT
).
stderr
stderr
should
include
(
"error: Invalid argument(s): invalidArg"
)
stderr
should
include
(
"Run 'wsk --help' for usage."
)
}
behavior
of
"Wsk Action CLI"
it
should
"create the same action twice with different cases"
in
withAssetCleaner
(
wskprops
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment