Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Commit

Permalink
Merge pull request #268 from arapulido/fix_error_message
Browse files Browse the repository at this point in the history
Fix error message about the list of available runtimes.
  • Loading branch information
ngtuna authored Aug 22, 2017
2 parents bd91734 + 6f1adb3 commit 65289ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions pkg/utils/k8sutil.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ func init() {
python27 := runtimeVersion{runtimeID: "python", version: "2.7", httpImage: python27Http, pubsubImage: python27Pubsub}
python = []runtimeVersion{python27}

node6 := runtimeVersion{runtimeID: "node", version: "6", httpImage: node6Http, pubsubImage: node6Pubsub}
node8 := runtimeVersion{runtimeID: "node", version: "8", httpImage: node8Http, pubsubImage: node8Pubsub}
node6 := runtimeVersion{runtimeID: "nodejs", version: "6", httpImage: node6Http, pubsubImage: node6Pubsub}
node8 := runtimeVersion{runtimeID: "nodejs", version: "8", httpImage: node8Http, pubsubImage: node8Pubsub}
node = []runtimeVersion{node6, node8}

ruby24 := runtimeVersion{runtimeID: "ruby", version: "2.4", httpImage: ruby24Http, pubsubImage: ""}
Expand Down
2 changes: 1 addition & 1 deletion pkg/utils/k8sutil_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func TestGetFunctionData(t *testing.T) {

// Throws an error if the runtime version doesn't exist
_, _, _, err = GetFunctionData("nodejs3", "HTTP", "test")
expectedErrMsg := regexp.MustCompile("The given runtime and version 'nodejs3' does not have a valid image for HTTP based functions. Available runtimes are: python2.7, node6, node8, ruby2.4")
expectedErrMsg := regexp.MustCompile("The given runtime and version 'nodejs3' does not have a valid image for HTTP based functions. Available runtimes are: python2.7, nodejs6, nodejs8, ruby2.4")
if expectedErrMsg.FindString(err.Error()) == "" {
t.Fatalf("Retrieving data for 'nodejs3' should return an error")
}
Expand Down

0 comments on commit 65289ff

Please sign in to comment.