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
7494a4d9
Commit
7494a4d9
authored
8 years ago
by
Mark Deuser
Browse files
Options
Downloads
Patches
Plain Diff
wsk property command supports setting and deleting multiple properties
parent
e16aa68e
No related branches found
Branches containing commit
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
+25
-0
25 additions, 0 deletions
tests/src/system/basic/WskBasicTests.scala
with
25 additions
and
0 deletions
tests/src/system/basic/WskBasicTests.scala
+
25
−
0
View file @
7494a4d9
...
...
@@ -106,6 +106,31 @@ class WskBasicTests
wskprops
.
delete
()
}
it
should
"set multiple property values with single command"
in
{
val
tmpwskprops
=
File
.
createTempFile
(
"wskprops"
,
".tmp"
)
val
env
=
Map
(
"WSK_CONFIG_FILE"
->
tmpwskprops
.
getAbsolutePath
())
val
stdout
=
wsk
.
cli
(
Seq
(
"property"
,
"set"
,
"--auth"
,
"testKey"
,
"--apihost"
,
"openwhisk.ng.bluemix.net"
,
"--apiversion"
,
"v1"
),
env
=
env
).
stdout
stdout
should
include
regex
(
"ok: whisk auth set"
)
stdout
should
include
regex
(
"ok: whisk API host set"
)
stdout
should
include
regex
(
"ok: whisk API version set"
)
val
fileContent
=
FileUtils
.
readFileToString
(
tmpwskprops
)
fileContent
should
include
(
"AUTH=testKey"
)
fileContent
should
include
(
"APIHOST=openwhisk.ng.bluemix.net"
)
fileContent
should
include
(
"APIVERSION=v1"
)
tmpwskprops
.
delete
()
}
it
should
"delete multiple property values with single command"
in
{
val
tmpwskprops
=
File
.
createTempFile
(
"wskprops"
,
".tmp"
)
val
env
=
Map
(
"WSK_CONFIG_FILE"
->
tmpwskprops
.
getAbsolutePath
())
val
stdout
=
wsk
.
cli
(
Seq
(
"property"
,
"unset"
,
"--auth"
,
"--apihost"
,
"--apiversion"
,
"--namespace"
),
env
=
env
).
stdout
stdout
should
include
regex
(
"ok: whisk auth unset"
)
stdout
should
include
regex
(
"ok: whisk API host unset"
)
stdout
should
include
regex
(
"ok: whisk API version unset"
)
stdout
should
include
regex
(
"ok: whisk namespace unset"
)
tmpwskprops
.
delete
()
}
it
should
"reject creating duplicate entity"
in
withAssetCleaner
(
wskprops
)
{
(
wp
,
assetHelper
)
=>
val
name
=
"testDuplicateCreate"
...
...
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