Skip to content

Commit

Permalink
Add a test, clean up.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilus committed Nov 1, 2021
1 parent 3cab0dd commit c952600
Show file tree
Hide file tree
Showing 3 changed files with 101 additions and 5 deletions.
103 changes: 101 additions & 2 deletions features/expose.feature
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Scenario: Expose tasks
"""

@current
Scenario: Never overwrite existing an task when exposing tasks
Given file ./Oyafile containing
"""
Expand Down Expand Up @@ -66,7 +65,6 @@ Scenario: Never overwrite existing an task when exposing tasks
"""

@current
Scenario: Show task as exposed when listing tasks
Given file ./Oyafile containing
"""
Expand Down Expand Up @@ -97,3 +95,104 @@ Scenario: Show task as exposed when listing tasks
oya run p.echo
"""

Scenario: Tasks exposed in imported subdirs carry over when imported
Given file ./Oyafile containing
"""
Project: main
"""
And file ./project1/Oyafile containing
"""
Values:
foo: project1
echo: |
echo "project1"
"""
And file ./project2/Oyafile containing
"""
Import:
p1: /project1
Expose: p1
"""
And file ./project3/Oyafile containing
"""
Import:
p2: /project2
Expose: p2
"""
And I'm in the ./project3 dir
When I run "oya run echo"
Then the command succeeds
And the command outputs
"""
project1
"""

Scenario: Tasks exposed in imported packs carry over when imported
Given file ./Oyafile containing
"""
Project: main
Require:
github.com/tooploox/pack3: v1.0.0
# Use replace so we don't have to host it on github.
Replace:
github.com/tooploox/pack3: /tmp/pack3
Import:
pack3: github.com/tooploox/pack3
Expose: pack3
"""
And file /tmp/pack1/Oyafile containing
"""
Project: github.com/tooploox/pack1
echo: |
echo "pack1"
"""
And file /tmp/pack2/Oyafile containing
"""
Project: github.com/tooploox/pack2
Require:
github.com/tooploox/pack1: v1.0.0
# Use replace so we don't have to host it on github.
Replace:
github.com/tooploox/pack1: /tmp/pack1
Import:
p1: github.com/tooploox/pack1
Expose: p1
"""
And file /tmp/pack3/Oyafile containing
"""
Project: github.com/tooploox/pack3
Require:
github.com/tooploox/pack2: v1.0.0
# Use replace so we don't have to host it on github.
Replace:
github.com/tooploox/pack2: /tmp/pack2
Import:
p2: github.com/tooploox/pack2
Expose: p2
"""
And I'm in the ./ dir
When I run "oya run echo"
Then the command succeeds
And the command outputs
"""
pack1
"""
2 changes: 0 additions & 2 deletions features/import.feature
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ Scenario: Import a pack with alias from a parameter
"""

@current
Scenario: Import a pack and expose it
Given file ./Oyafile containing
"""
Expand All @@ -158,7 +157,6 @@ Scenario: Import a pack and expose it
"""

@current
Scenario: Try to expose two packs
Given file ./Oyafile containing
"""
Expand Down
1 change: 0 additions & 1 deletion features/tasks.feature
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ Scenario: Subdirectories are not recursed by default
"""

@current
Scenario: Subdirectories can be recursed
Given file ./Oyafile containing
"""
Expand Down

0 comments on commit c952600

Please sign in to comment.