-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
381 additions
and
381 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,49 @@ | ||
Feature: Check origin of a file in project directory using "why" command | ||
|
||
Scenario: File generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file "README.md" is created | ||
Then CLI produced an output "File 'README.md' is created by the recipe 'foo'" | ||
Scenario: File generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file "README.md" is created | ||
Then CLI produced an output "File 'README.md' is created by the recipe 'foo'" | ||
|
||
Scenario: Nested file generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo/bar.yml" | ||
And I execute recipe "foo" | ||
When I check why the file "foo/bar.yml" is created | ||
Then CLI produced an output "File 'foo/bar.yml' is created by the recipe 'foo'" | ||
Scenario: Directory generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo/bar.yml" | ||
And I execute recipe "foo" | ||
When I check why the file "foo" is created | ||
Then CLI produced an output "Directory 'foo' is created by the recipe 'foo'" | ||
Scenario: Nested file generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo/bar.yml" | ||
And I execute recipe "foo" | ||
When I check why the file "foo/bar.yml" is created | ||
Then CLI produced an output "File 'foo/bar.yml' is created by the recipe 'foo'" | ||
Scenario: Directory generated by a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo/bar.yml" | ||
And I execute recipe "foo" | ||
When I check why the file "foo" is created | ||
Then CLI produced an output "Directory 'foo' is created by the recipe 'foo'" | ||
|
||
Scenario: Directory generated by Jalapeno | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file ".jalapeno" is created | ||
Then CLI produced an output "Directory '.jalapeno' is created by Jalapeno" | ||
Scenario: File generated by Jalapeno | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file ".jalapeno/sauces.yml" is created | ||
Then CLI produced an output "File '.jalapeno/sauces.yml' is created by Jalapeno" | ||
Scenario: Directory generated by Jalapeno | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file ".jalapeno" is created | ||
Then CLI produced an output "Directory '.jalapeno' is created by Jalapeno" | ||
Scenario: File generated by Jalapeno | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file ".jalapeno/sauces.yml" is created | ||
Then CLI produced an output "File '.jalapeno/sauces.yml' is created by Jalapeno" | ||
|
||
Scenario: File not found | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file "not-found" is created | ||
Then CLI produced an error "file '.*/not-found' does not exist" | ||
Scenario: File not found | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And I execute recipe "foo" | ||
When I check why the file "not-found" is created | ||
Then CLI produced an error "file '.*/not-found' does not exist" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,124 +1,124 @@ | ||
Feature: Check for new recipe versions | ||
Scenario: Find newer version for a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
Then CLI produced an output "To upgrade recipes to the latest version run:\n (.*) upgrade oci://localhost:\d+/foo:v0.0.2\n" | ||
Scenario: Find newer version for a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
Then CLI produced an output "To upgrade recipes to the latest version run:\n (.*) upgrade oci://localhost:\d+/foo:v0.0.2\n" | ||
|
||
Scenario: Find multiple newer version for a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I change recipe "foo" to version "v0.0.3" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2, v0.0.3" | ||
Then CLI produced an output "To upgrade recipes to the latest version run:\n (.*) upgrade oci://localhost:\d+/foo:v0.0.3\n" | ||
Scenario: Find multiple newer version for a recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I change recipe "foo" to version "v0.0.3" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2, v0.0.3" | ||
Then CLI produced an output "To upgrade recipes to the latest version run:\n (.*) upgrade oci://localhost:\d+/foo:v0.0.3\n" | ||
|
||
Scenario: Find newer version for multiple recipes | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo.md" | ||
And a recipe "bar" that generates file "bar.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I execute recipe "bar" | ||
And the source of the sauce with recipe "bar" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
When I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "bar" to version "v0.0.2" | ||
And I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
Then I check new versions | ||
Then CLI produced an output "foo: new versions found: v0.0.2" | ||
And CLI produced an output "bar: new versions found: v0.0.2" | ||
Scenario: Find newer version for multiple recipes | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo.md" | ||
And a recipe "bar" that generates file "bar.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I execute recipe "bar" | ||
And the source of the sauce with recipe "bar" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
When I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "bar" to version "v0.0.2" | ||
And I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
Then I check new versions | ||
Then CLI produced an output "foo: new versions found: v0.0.2" | ||
And CLI produced an output "bar: new versions found: v0.0.2" | ||
|
||
Scenario: Unable to find newer recipe versions | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "no new versions found" | ||
Scenario: Unable to find newer recipe versions for all recipes | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo.md" | ||
And a recipe "bar" that generates file "bar.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I execute recipe "bar" | ||
And the source of the sauce with recipe "bar" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
When I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
Then I check new versions | ||
Then CLI produced an output "foo: new versions found: v0.0.2" | ||
And CLI produced an output "bar: no new versions found" | ||
Scenario: Unable to find newer recipe versions | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
And I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "no new versions found" | ||
Scenario: Unable to find newer recipe versions for all recipes | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "foo.md" | ||
And a recipe "bar" that generates file "bar.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
And the source of the sauce with recipe "foo" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I execute recipe "bar" | ||
And the source of the sauce with recipe "bar" is in the local OCI registry | ||
Then execution of the recipe has succeeded | ||
When I push the recipe "foo" to the local OCI repository | ||
When I push the recipe "bar" to the local OCI repository | ||
Then no errors were printed | ||
When I change recipe "foo" to version "v0.0.2" | ||
And I push the recipe "foo" to the local OCI repository | ||
Then no errors were printed | ||
Then I check new versions | ||
Then CLI produced an output "foo: new versions found: v0.0.2" | ||
And CLI produced an output "bar: no new versions found" | ||
|
||
Scenario: Executing remote recipe automatically adds the repo as source for the sauce | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.1" | ||
And I change recipe "foo" to version "v0.0.2" | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.2" | ||
When I execute the recipe from the local OCI repository "foo:v0.0.1" | ||
Then execution of the recipe has succeeded | ||
# Note the lack of explicitly setting the source for the sauce | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
Scenario: Executing remote recipe automatically adds the repo as source for the sauce | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.1" | ||
And I change recipe "foo" to version "v0.0.2" | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.2" | ||
When I execute the recipe from the local OCI repository "foo:v0.0.1" | ||
Then execution of the recipe has succeeded | ||
# Note the lack of explicitly setting the source for the sauce | ||
And I check new versions for recipe "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
|
||
Scenario: Manually override the check from URL for locally executed recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
Then execution of the recipe has succeeded | ||
When the recipe "foo" is pushed to the local OCI repository "foo:v0.0.1" | ||
And I change recipe "foo" to version "v0.0.2" | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.2" | ||
And I check new versions for recipe "foo" from the local OCI repository "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
And the sauce file contains a sauce in index 0 which should have property "from" with value "^oci://localhost:\d+/foo$" | ||
Scenario: Manually override the check from URL for locally executed recipe | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
And a local OCI registry | ||
When I execute recipe "foo" | ||
Then execution of the recipe has succeeded | ||
When the recipe "foo" is pushed to the local OCI repository "foo:v0.0.1" | ||
And I change recipe "foo" to version "v0.0.2" | ||
And the recipe "foo" is pushed to the local OCI repository "foo:v0.0.2" | ||
And I check new versions for recipe "foo" from the local OCI repository "foo" | ||
Then CLI produced an output "new versions found: v0.0.2" | ||
And the sauce file contains a sauce in index 0 which should have property "from" with value "^oci://localhost:\d+/foo$" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
Feature: Create new recipes | ||
Scenario: Using CLI to create a new recipe | ||
Given a recipes directory | ||
When I create a recipe with name "foo" | ||
Then no errors were printed | ||
And the recipes directory should contain recipe "foo" | ||
Scenario: Using CLI to create a new recipe | ||
Given a recipes directory | ||
When I create a recipe with name "foo" | ||
Then no errors were printed | ||
And the recipes directory should contain recipe "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
Feature: Eject | ||
Ejecting removes all traces of Jalapeno from a project | ||
Ejecting removes all traces of Jalapeno from a project | ||
|
||
Scenario: Eject project | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
When I execute recipe "foo" | ||
And I eject Jalapeno from the project | ||
Then no errors were printed | ||
And there should not be a sauce directory in the project directory | ||
Scenario: Eject project | ||
Given a project directory | ||
And a recipes directory | ||
And a recipe "foo" that generates file "README.md" | ||
When I execute recipe "foo" | ||
And I eject Jalapeno from the project | ||
Then no errors were printed | ||
And there should not be a sauce directory in the project directory |
Oops, something went wrong.