Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
41 changes: 41 additions & 0 deletions content/io/cloudslang/base/math/test.sl
Original file line number Diff line number Diff line change
@@ -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