Skip to content

Commit ed795ed

Browse files
cbickelmdeuser
authored andcommitted
Bump client to display numeric codes correctly again. (#285)
1 parent 999cf0e commit ed795ed

2 files changed

Lines changed: 21 additions & 21 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ dependencies {
2424
build(['name':'golang.org/x/sys/unix', 'version':'7f918dd405547ecb864d14a8ecbbfe205b5f930f', 'transitive':false])
2525
build(['name':'gopkg.in/yaml.v2', 'version':'cd8b52f8269e0feb286dfeef29f8fe4d5b397e0b', 'transitive':false])
2626
build(['name':'github.com/ghodss/yaml', 'version':'0ca9ea5df5451ffdf184b4428c902747c2c11cd7', 'transitive':false])
27-
build(['name':'github.com/apache/incubator-openwhisk-client-go/whisk','version':'3d62dac688b8efa88f924658a9ac8f1058fed4ea','transitive':false])
27+
build(['name':'github.com/apache/incubator-openwhisk-client-go/whisk','version':'e452b524cd745f71c913c5acccf72a8daba6dc71','transitive':false])
2828
// END - Imported from Godeps
2929
test name:'github.com/stretchr/testify', version:'b91bfb9ebec76498946beb6af7c0230c7cc7ba6c', transitive:false //, tag: 'v1.2.0'
3030
test name:'github.com/spf13/viper', version:'aafc9e6bc7b7bb53ddaa75a5ef49a17d6e654be5', transitive:false

tests/src/test/scala/system/basic/WskCliBasicTests.scala

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -158,20 +158,20 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
158158
}
159159

160160
val stderr = wsk.pkg.create(name, expectedExitCode = CONFLICT).stderr
161-
stderr should include regex (s"""Unable to create package '$name': resource already exists \\(code \\d+\\)""")
161+
stderr should include regex (s"""Unable to create package '$name': resource already exists \\(code [0-9a-zA-Z_-]+\\)""")
162162
}
163163

164164
it should "reject delete of package that does not exist" in {
165165
val name = "nonexistentPackage"
166166
val stderr = wsk.pkg.delete(name, expectedExitCode = NOT_FOUND).stderr
167-
stderr should include regex (s"""Unable to delete package '$name'. The requested resource does not exist. \\(code \\d+\\)""")
167+
stderr should include regex (s"""Unable to delete package '$name'. The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
168168
}
169169

170170
it should "reject get of package that does not exist" in {
171171
val name = "nonexistentPackage"
172172
val ns = wsk.namespace.whois()
173173
val stderr = wsk.pkg.get(name, expectedExitCode = NOT_FOUND).stderr
174-
stderr should include regex (s"""Unable to get package '$name': ${Messages.resourceDoesntExist(s"${ns}/${name}")} \\(code \\d+\\)""")
174+
stderr should include regex (s"""Unable to get package '$name': ${Messages.resourceDoesntExist(s"${ns}/${name}")} \\(code [0-9a-zA-Z_-]+\\)""")
175175
}
176176

177177
behavior of "Wsk Action CLI"
@@ -214,25 +214,25 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
214214
}
215215

216216
val stderr = wsk.action.create(name, file, expectedExitCode = CONFLICT).stderr
217-
stderr should include regex (s"""Unable to create action '$name': resource already exists \\(code \\d+\\)""")
217+
stderr should include regex (s"""Unable to create action '$name': resource already exists \\(code [0-9a-zA-Z_-]+\\)""")
218218
}
219219

220220
it should "reject delete of action that does not exist" in {
221221
val name = "nonexistentAction"
222222
val stderr = wsk.action.delete(name, expectedExitCode = NOT_FOUND).stderr
223-
stderr should include regex (s"""Unable to delete action '$name'. The requested resource does not exist. \\(code \\d+\\)""")
223+
stderr should include regex (s"""Unable to delete action '$name'. The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
224224
}
225225

226226
it should "reject invocation of action that does not exist" in {
227227
val name = "nonexistentAction"
228228
val stderr = wsk.action.invoke(name, expectedExitCode = NOT_FOUND).stderr
229-
stderr should include regex (s"""Unable to invoke action '$name': The requested resource does not exist. \\(code \\d+\\)""")
229+
stderr should include regex (s"""Unable to invoke action '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
230230
}
231231

232232
it should "reject get of an action that does not exist" in {
233233
val name = "nonexistentAction"
234234
val stderr = wsk.action.get(name, expectedExitCode = NOT_FOUND).stderr
235-
stderr should include regex (s"""Unable to get action '$name': The requested resource does not exist. \\(code \\d+\\)""")
235+
stderr should include regex (s"""Unable to get action '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
236236
}
237237

238238
it should "create, and invoke an action that utilizes a docker container" in withAssetCleaner(wskprops) {
@@ -664,25 +664,25 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
664664
}
665665

666666
val stderr = wsk.trigger.create(name, expectedExitCode = CONFLICT).stderr
667-
stderr should include regex (s"""Unable to create trigger '$name': resource already exists \\(code \\d+\\)""")
667+
stderr should include regex (s"""Unable to create trigger '$name': resource already exists \\(code [0-9a-zA-Z_-]+\\)""")
668668
}
669669

670670
it should "reject delete of trigger that does not exist" in {
671671
val name = "nonexistentTrigger"
672672
val stderr = wsk.trigger.delete(name, expectedExitCode = NOT_FOUND).stderr
673-
stderr should include regex (s"""Unable to get trigger '$name'. The requested resource does not exist. \\(code \\d+\\)""")
673+
stderr should include regex (s"""Unable to get trigger '$name'. The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
674674
}
675675

676676
it should "reject get of trigger that does not exist" in {
677677
val name = "nonexistentTrigger"
678678
val stderr = wsk.trigger.get(name, expectedExitCode = NOT_FOUND).stderr
679-
stderr should include regex (s"""Unable to get trigger '$name': The requested resource does not exist. \\(code \\d+\\)""")
679+
stderr should include regex (s"""Unable to get trigger '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
680680
}
681681

682682
it should "reject firing of a trigger that does not exist" in {
683683
val name = "nonexistentTrigger"
684684
val stderr = wsk.trigger.fire(name, expectedExitCode = NOT_FOUND).stderr
685-
stderr should include regex (s"""Unable to fire trigger '$name': The requested resource does not exist. \\(code \\d+\\)""")
685+
stderr should include regex (s"""Unable to fire trigger '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
686686
}
687687

688688
it should "create and fire a trigger with a rule whose action has been deleted" in withAssetCleaner(wskprops) {
@@ -868,37 +868,37 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
868868

869869
val stderr =
870870
wsk.rule.create(ruleName, trigger = triggerName, action = actionName, expectedExitCode = CONFLICT).stderr
871-
stderr should include regex (s"""Unable to create rule '$ruleName': resource already exists \\(code \\d+\\)""")
871+
stderr should include regex (s"""Unable to create rule '$ruleName': resource already exists \\(code [0-9a-zA-Z_-]+\\)""")
872872
}
873873

874874
it should "reject delete of rule that does not exist" in {
875875
val name = "nonexistentRule"
876876
val stderr = wsk.rule.delete(name, expectedExitCode = NOT_FOUND).stderr
877-
stderr should include regex (s"""Unable to delete rule '$name'. The requested resource does not exist. \\(code \\d+\\)""")
877+
stderr should include regex (s"""Unable to delete rule '$name'. The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
878878
}
879879

880880
it should "reject enable of rule that does not exist" in {
881881
val name = "nonexistentRule"
882882
val stderr = wsk.rule.enable(name, expectedExitCode = NOT_FOUND).stderr
883-
stderr should include regex (s"""Unable to enable rule '$name': The requested resource does not exist. \\(code \\d+\\)""")
883+
stderr should include regex (s"""Unable to enable rule '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
884884
}
885885

886886
it should "reject disable of rule that does not exist" in {
887887
val name = "nonexistentRule"
888888
val stderr = wsk.rule.disable(name, expectedExitCode = NOT_FOUND).stderr
889-
stderr should include regex (s"""Unable to disable rule '$name': The requested resource does not exist. \\(code \\d+\\)""")
889+
stderr should include regex (s"""Unable to disable rule '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
890890
}
891891

892892
it should "reject status of rule that does not exist" in {
893893
val name = "nonexistentRule"
894894
val stderr = wsk.rule.state(name, expectedExitCode = NOT_FOUND).stderr
895-
stderr should include regex (s"""Unable to get status of rule '$name': The requested resource does not exist. \\(code \\d+\\)""")
895+
stderr should include regex (s"""Unable to get status of rule '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
896896
}
897897

898898
it should "reject get of rule that does not exist" in {
899899
val name = "nonexistentRule"
900900
val stderr = wsk.rule.get(name, expectedExitCode = NOT_FOUND).stderr
901-
stderr should include regex (s"""Unable to get rule '$name': The requested resource does not exist. \\(code \\d+\\)""")
901+
stderr should include regex (s"""Unable to get rule '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
902902
}
903903

904904
behavior of "Wsk Namespace CLI"
@@ -955,19 +955,19 @@ class WskCliBasicTests extends TestHelpers with WskTestHelpers {
955955
it should "reject get of activation that does not exist" in {
956956
val name = "0" * 32
957957
val stderr = wsk.activation.get(Some(name), expectedExitCode = NOT_FOUND).stderr
958-
stderr should include regex (s"""Unable to get activation '$name': The requested resource does not exist. \\(code \\d+\\)""")
958+
stderr should include regex (s"""Unable to get activation '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
959959
}
960960

961961
it should "reject logs of activation that does not exist" in {
962962
val name = "0" * 32
963963
val stderr = wsk.activation.logs(Some(name), expectedExitCode = NOT_FOUND).stderr
964-
stderr should include regex (s"""Unable to get logs for activation '$name': The requested resource does not exist. \\(code \\d+\\)""")
964+
stderr should include regex (s"""Unable to get logs for activation '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
965965
}
966966

967967
it should "reject result of activation that does not exist" in {
968968
val name = "0" * 32
969969
val stderr = wsk.activation.result(Some(name), expectedExitCode = NOT_FOUND).stderr
970-
stderr should include regex (s"""Unable to get result for activation '$name': The requested resource does not exist. \\(code \\d+\\)""")
970+
stderr should include regex (s"""Unable to get result for activation '$name': The requested resource does not exist. \\(code [0-9a-zA-Z_-]+\\)""")
971971
}
972972

973973
it should "reject activation request when using activation ID with --last Flag" in withAssetCleaner(wskprops) {

0 commit comments

Comments
 (0)