You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by cs...@apache.org on 2017/08/10 12:08:36 UTC

[incubator-openwhisk-cli] 11/11: Update go version from 1.7 to 1.8

This is an automated email from the ASF dual-hosted git repository.

csantanapr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-openwhisk-cli.git

commit fae105252359bba5c6a783d875df838ec6081dab
Author: Vincent Hou <sh...@us.ibm.com>
AuthorDate: Wed Aug 9 17:30:40 2017 -0400

    Update go version from 1.7 to 1.8
---
 .travis.yml                               |   4 +-
 CONTRIBUTING.md                           |   2 +-
 Dockerfile                                |   2 +-
 tests/dat/actions/multipleHeaders.js      |   8 +
 tests/dat/apigw/testswaggerdoc1           | 104 +++++-------
 tests/dat/apigw/testswaggerdoc2           | 272 +++++++++---------------------
 tests/src/integration/integration_test.go |  28 ---
 7 files changed, 134 insertions(+), 286 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index e773f69..fe4ffe1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -6,12 +6,12 @@ matrix:
     include:
         - os: linux
           sudo: required
-          go: 1.7
+          go: 1.8
           env:
             secure: "Br0fD9CAKm8gqyEuwmltNJd4dGJCxPpj6feugHlO+CFFwfE/+kJKkpTlsDuRfrUzUDlWiETNPf0XGSjvPFqZExnLCE9XQh2+XF6u+S3YBWfM+rbbyRVAK6BlTwmt0u3jRJ2JP7spedTGZA+qfIWI+UkwoOexo7NcqtMPLahiZzheaaad8y3J+crHQCrB/kPrhLqKVMEOkIbveFdfV2QLfCOWgqP8e1LGZhPZ2N4QcNo0iB5uI4ZyYszTZDniXFKxz7kBs4tl4ZQDqRHqL02qKPsjbvjrZp83ql+PbC2dpgXi9YpaDuBEqKKX1rTQP5ppcwbobot5U3ItHWzpXbLCdsWxvbde/0enjMmOF1wwl71hPYIf7PkQmNAWXRtL2Z1TguO/dKCeXBLDER4YDQ79GYpikAMqnrRLou4rsyZrNUzg8aHbELzAHppDSpqEJN8ymGgWgmWBT8yPaWVwN5CjPFO [...]
           services: docker
         - os: osx
-          go: 1.7
+          go: 1.8
 
 git:
   depth: 3
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 32e9953..e033c77 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -50,7 +50,7 @@ Please use [Slack channel #whisk-users](https://cloudplatform.slack.com/messages
 
 ## Setup
 
-Project was written with `Go v1.7`. It has a dependency on [incubator-openwhisk-client-go](https://github.com/apache/incubator-openwhisk-client-go).
+Project was written with `Go v1.8`. It has a dependency on [incubator-openwhisk-client-go](https://github.com/apache/incubator-openwhisk-client-go).
 
 ## Testing
 
diff --git a/Dockerfile b/Dockerfile
index 95ef7a4..bedb6f7 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM golang:1.7
+FROM golang:1.8
 
 # Install zip
 RUN apt-get -y update && \
diff --git a/tests/dat/actions/multipleHeaders.js b/tests/dat/actions/multipleHeaders.js
new file mode 100644
index 0000000..06712c1
--- /dev/null
+++ b/tests/dat/actions/multipleHeaders.js
@@ -0,0 +1,8 @@
+function main() {
+    return {
+        headers: {
+            "Set-Cookie": ["a=b", "c=d"]
+        },
+        code: 200
+    }
+}
diff --git a/tests/dat/apigw/testswaggerdoc1 b/tests/dat/apigw/testswaggerdoc1
index f627fb6..623ae43 100644
--- a/tests/dat/apigw/testswaggerdoc1
+++ b/tests/dat/apigw/testswaggerdoc1
@@ -8,76 +8,54 @@
     "paths": {
         "/path": {
             "get": {
+                "operationId": "get_/path",
                 "responses": {
                     "default": {
                         "description": "Default response"
                     }
                 },
-                "x-ibm-op-ext": {
-                    "actionName": "CLI_APIGWTEST7_action",
-                    "actionNamespace": "guest",
-                    "backendMethod": "POST",
-                    "backendUrl": "https://999.999.99.999/api/v1/namespaces/guest/actions/CLI_APIGWTEST7_action",
-                    "policies": [
-                        {
-                            "type": "reqMapping",
-                            "value": [
-                                {
-                                    "action": "transform",
-                                    "from": {
-                                        "location": "query",
-                                        "name": "*"
-                                    },
-                                    "to": {
-                                        "location": "body",
-                                        "name": "*"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "Basic I34EJL53W3HGP64AB4E4DJ37FFGA424238GF6J"
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Authorization"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "application/json"
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Content-Type"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "blocking"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "result"
-                                    }
-                                }
-                            ]
-                        }
-                    ]
+                "x-openwhisk": {
+                    "action": "CLI_APIGWTEST7_action",
+                    "namespace": "whisk.system",
+                    "package": "",
+                    "url": "https://172.17.0.1/api/v1/web/whisk.system/default/CLI_APIGWTEST7_action.http"
                 }
             }
         }
+    },
+    "x-ibm-configuration": {
+        "assembly": {
+            "execute": [
+                {
+                    "set-variable": {
+                        "actions": [
+                            {
+                                "set": "message.headers.Authorization",
+                                "value": "Basic Nzg5YzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOmFiY3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
+                            }
+                        ]
+                    }
+                },
+                {
+                    "operation-switch": {
+                        "case": [
+                            {
+                                "execute": [
+                                    {
+                                        "invoke": {
+                                            "target-url": "https://172.17.0.1/api/v1/web/whisk.system/default/CLI_APIGWTEST7_action.http",
+                                            "verb": "keep"
+                                        }
+                                    }
+                                ],
+                                "operations": [
+                                    "get_/path"
+                                ]
+                            }
+                        ]
+                    }
+                }
+            ]
+        }
     }
 }
diff --git a/tests/dat/apigw/testswaggerdoc2 b/tests/dat/apigw/testswaggerdoc2
index 7d710d8..2556853 100644
--- a/tests/dat/apigw/testswaggerdoc2
+++ b/tests/dat/apigw/testswaggerdoc2
@@ -2,226 +2,116 @@
     "swagger": "2.0",
     "basePath": "/test1/v1",
     "info": {
-        "title": "/test1/v1",
+        "title": "CLI_APIGWTEST13 API Name",
         "version": "1.0.0"
     },
     "paths": {
-        "/whisk.system/utils/echo": {
+        "/whisk_system/utils/echo": {
             "get": {
+                "operationId": "get_/whisk_system/utils/echo",
                 "responses": {
                     "default": {
                         "description": "Default response"
                     }
                 },
-                "x-ibm-op-ext": {
-                    "actionName": "test1a",
-                    "actionNamespace": "guest",
-                    "backendMethod": "POST",
-                    "backendUrl": "https://192.168.33.13/api/v1/namespaces/guest/actions/test1a",
-                    "policies": [
-                        {
-                            "type": "reqMapping",
-                            "value": [
-                                {
-                                    "action": "transform",
-                                    "from": {
-                                        "location": "query",
-                                        "name": "*"
-                                    },
-                                    "to": {
-                                        "location": "body",
-                                        "name": "*"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Authorization"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "application/json"
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Content-Type"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "blocking"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "result"
-                                    }
-                                }
-                            ]
-                        }
-                    ]
+                "x-openwhisk": {
+                    "action": "test1a",
+                    "namespace": "whisk.system",
+                    "package": "",
+                    "url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http"
                 }
             },
             "post": {
+                "operationId": "post_/whisk_system/utils/echo",
                 "responses": {
                     "default": {
                         "description": "Default response"
                     }
                 },
-                "x-ibm-op-ext": {
-                    "actionName": "test1a",
-                    "actionNamespace": "guest",
-                    "backendMethod": "POST",
-                    "backendUrl": "https://192.168.33.13/api/v1/namespaces/guest/actions/test1a",
-                    "policies": [
-                        {
-                            "type": "reqMapping",
-                            "value": [
-                                {
-                                    "action": "transform",
-                                    "from": {
-                                        "location": "query",
-                                        "name": "*"
-                                    },
-                                    "to": {
-                                        "location": "body",
-                                        "name": "*"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Authorization"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "application/json"
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Content-Type"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "blocking"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "result"
-                                    }
-                                }
-                            ]
-                        }
-                    ]
+                "x-openwhisk": {
+                    "action": "test1a",
+                    "namespace": "whisk.system",
+                    "package": "",
+                    "url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http"
                 }
             }
         },
-        "/whisk.system/utils/split": {
+        "/whisk_system/utils/split": {
             "post": {
+                "operationId": "post_/whisk_system/utils/split",
                 "responses": {
                     "default": {
                         "description": "Default response"
                     }
                 },
-                "x-ibm-op-ext": {
-                    "actionName": "test1a",
-                    "actionNamespace": "guest",
-                    "backendMethod": "POST",
-                    "backendUrl": "https://192.168.33.13/api/v1/namespaces/guest/actions/test1a",
-                    "policies": [
-                        {
-                            "type": "reqMapping",
-                            "value": [
-                                {
-                                    "action": "transform",
-                                    "from": {
-                                        "location": "query",
-                                        "name": "*"
-                                    },
-                                    "to": {
-                                        "location": "body",
-                                        "name": "*"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "Basic MjNiYzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOjEyM3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Authorization"
-                                    }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "application/json"
-                                    },
-                                    "to": {
-                                        "location": "header",
-                                        "name": "Content-Type"
+                "x-openwhisk": {
+                    "action": "test1a",
+                    "namespace": "whisk.system",
+                    "package": "",
+                    "url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http"
+                }
+            }
+        }
+    },
+    "x-ibm-configuration": {
+        "assembly": {
+            "execute": [
+                {
+                    "set-variable": {
+                        "actions": [
+                            {
+                                "set": "message.headers.Authorization",
+                                "value": "Basic Nzg5YzQ2YjEtNzFmNi00ZWQ1LThjNTQtODE2YWE0ZjhjNTAyOmFiY3pPM3haQ0xyTU42djJCS0sxZFhZRnBYbFBrY2NPRnFtMTJDZEFzTWdSVTRWck5aOWx5R1ZDR3VNREdJd1A="
+                            }
+                        ]
+                    }
+                },
+                {
+                    "operation-switch": {
+                        "case": [
+                            {
+                                "operations": [
+                                    "get_/whisk_system/utils/echo"
+                                ],
+                                "execute": [
+                                    {
+                                        "invoke": {
+                                            "target-url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http",
+                                            "verb": "get"
+                                        }
                                     }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "blocking"
+                                ]
+                            },
+                            {
+                                "operations": [
+                                    "post_/whisk_system/utils/echo"
+                                ],
+                                "execute": [
+                                    {
+                                        "invoke": {
+                                            "target-url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http",
+                                            "verb": "post"
+                                        }
                                     }
-                                },
-                                {
-                                    "action": "insert",
-                                    "from": {
-                                        "value": "true"
-                                    },
-                                    "to": {
-                                        "location": "query",
-                                        "name": "result"
+                                ]
+                            },
+                            {
+                                "operations": [
+                                    "post_/whisk_system/utils/split"
+                                ],
+                                "execute": [
+                                    {
+                                        "invoke": {
+                                            "target-url": "https://172.17.0.1/api/v1/web/whisk.system/default/test1a.http",
+                                            "verb": "post"
+                                        }
                                     }
-                                }
-                            ]
-                        }
-                    ]
+                                ]
+                            }
+                        ]
+                    }
                 }
-            }
+            ]
         }
     }
-}
\ No newline at end of file
+}
diff --git a/tests/src/integration/integration_test.go b/tests/src/integration/integration_test.go
index f25b560..f2edbcb 100644
--- a/tests/src/integration/integration_test.go
+++ b/tests/src/integration/integration_test.go
@@ -53,34 +53,6 @@ var invalidShared = "Cannot use value '" + invalidArg + "' for shared"
 func initInvalidArgs() {
     invalidArgs = []common.InvalidArg{
         common.InvalidArg {
-            Cmd: []string{"api-experimental", "create"},
-            Err: tooFewArgsMsg + " " + apiCreateReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "create", "/basepath", "/path", "GET", "action", invalidArg},
-            Err: tooManyArgsMsg + invalidArg + ". " + apiCreateReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "get"},
-            Err: tooFewArgsMsg + " " + apiGetReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "get", "/basepath", invalidArg},
-            Err: tooManyArgsMsg + invalidArg + ". " + apiGetReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "delete"},
-            Err: tooFewArgsMsg + " " + apiDeleteReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "delete", "/basepath", "/path", "GET", invalidArg},
-            Err: tooManyArgsMsg + invalidArg + ". " + apiDeleteReqMsg,
-        },
-        common.InvalidArg {
-            Cmd: []string{"api-experimental", "list", "/basepath", "/path", "GET", invalidArg},
-            Err: tooManyArgsMsg + invalidArg + ". " + apiListReqMsg,
-        },
-        common.InvalidArg {
             Cmd: []string{"action", "create"},
             Err: tooFewArgsMsg + " " + actionNameActionReqMsg,
         },

-- 
To stop receiving notification emails like this one, please contact
"commits@openwhisk.apache.org" <co...@openwhisk.apache.org>.