Skip to content

Commit

Permalink
Update feature spec for multiple includes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mongey committed Jun 15, 2022
1 parent 0726bfc commit 88d1cbb
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions integration_tests/features/orb_pack.feature
Original file line number Diff line number Diff line change
Expand Up @@ -22,22 +22,27 @@ Feature: Orb pack
And the exit status should be 0

@mocked_home_directory
Scenario: Orb pack with multiple includes fails
Scenario: Orb pack with multiple includes
Given a file named "src/@orb.yml" with:
"""
commands:
test:
steps:
- run:
command: <<include(script.sh)>> <<include(script.sh)>>
command: <<include(script.sh)>> <<include(script2.sh)>>
"""
Given a file named "src/script.sh" with "echo Hello, world!"
Given a file named "src/script.sh" with "echo Hello"
Given a file named "src/script2.sh" with "world!"
When I run `circleci orb pack src`
Then the output should contain:
"""
Error: An unexpected error occurred: multiple include statements: '<<include(script.sh)>> <<include(script.sh)>>'
commands:
test:
steps:
- run:
command: echo Hello, world!
"""
And the exit status should be 255
And the exit status should be 0

@mocked_home_directory
Scenario: Orb pack with include statement in bigger string
Expand All @@ -47,15 +52,19 @@ Feature: Orb pack
test:
steps:
- run:
command: include <<include(script.sh)>>
command: echo "<<include(script.sh)>>"
"""
Given a file named "src/script.sh" with "echo Hello, world!"
Given a file named "src/script.sh" with "Hello, world!"
When I run `circleci orb pack src`
Then the output should contain:
"""
Error: An unexpected error occurred: entire string must be include statement: 'include <<include(script.sh)>>'
commands:
test:
steps:
- run:
command: echo Hello, world!
"""
And the exit status should be 255
And the exit status should be 0

@mocked_home_directory
Scenario: Missing @orb.yml for orb packing
Expand Down

0 comments on commit 88d1cbb

Please sign in to comment.