diff --git a/.travis.yml b/.travis.yml index 031f632e18..0838d2644b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ script: - docker info - docker version - df -kh - - wget https://github.com/CloudSlang/cloud-slang/releases/download/cloudslang-1.0.96/cslang-builder.zip + - wget https://github.com/CloudSlang/cloud-slang/releases/download/cloudslang-1.0.243/cslang-builder.zip - unzip -q cslang-builder.zip - chmod +x cslang-builder/bin/cslang-builder - ./cslang-builder/bin/cslang-builder -ts ${SUITE},\!default -cov -des -cs diff --git a/content/io/cloudslang/base/math/test.sl b/content/io/cloudslang/base/math/test.sl new file mode 100644 index 0000000000..15b259fda7 --- /dev/null +++ b/content/io/cloudslang/base/math/test.sl @@ -0,0 +1,41 @@ +# (c) Copyright 2019 EntIT Software LLC, a Micro Focus company, L.P. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License v2.0 which accompany this distribution. +# +# The Apache License is available at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +######################################################################################################################## +#!! +#! @description: test. +#! +#! @input value: test. +#! +#! @output return_code: test. +#! @output exception: test. +#! +#! @result SUCCESS: test. +#! @result FAILURE: test. +#!!# +######################################################################################################################## +namespace: io.cloudslang.base.math +operation: + name: test + inputs: + - value + python_action: + use_jython: false + script: "# do not remove the execute function \ndef execute(value): \n x = int(value)\n if x > 5:\n return{\"return_code\":\"1\", \"exception\":'x should not exceed 5.'}\n else:\n return{\"return_code\":\"0\"}\n# you can add additional helper methods below." + outputs: + - return_code + - exception + results: + - SUCCESS: "${return_code == '0'}" + - FAILURE +