Skip to content

Commit

Permalink
Adding failing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotforbes committed Mar 31, 2023
1 parent ee2797e commit 2766f0e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions integration_tests/features/circleci_config.feature
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,36 @@ Feature: Config checking
Then the output should contain "fighters"
And the exit status should be 0

Scenario: Testing new type casting works as expected
Given a file named "config.yml" with:
"""
version: 2.1
jobs:
datadog-hello-world:
docker:
- image: cimg/base:stable
parameters:
an-integer:
description: a test case to ensure parameters are passed correctly
type: integer
default: -1
steps:
- unless:
condition:
equal: [<< parameters.an-integer >>, -1]
steps:
- run: echo "<< parameters.an-integer >> - test"
workflows:
main-workflow:
jobs:
- datadog-hello-world:
an-integer: << pipeline.number >>
"""
When I run `circleci config process config.yml`
Then the output should contain "1 - test"
And the exit status should be 0

Scenario: Checking a valid config file with default pipeline params
Given a file named "config.yml" with:
"""
Expand Down

0 comments on commit 2766f0e

Please sign in to comment.