| 1 |
Feature: cli/install/path |
| 2 |
Puppet librarian needs to install modules from local paths |
| 3 |
|
| 4 |
Scenario: Install a module with dependencies specified in a Puppetfile |
| 5 |
Given a file named "Puppetfile" with: |
| 6 |
""" |
| 7 |
mod 'librarian/with_puppetfile', :path => '../../features/examples/with_puppetfile' |
| 8 |
""" |
| 9 |
When I successfully run `librarian-puppet install` |
| 10 |
And the file "modules/with_puppetfile/metadata.json" should match /"name": "librarian-with_puppetfile"/ |
| 11 |
And the file "modules/test/metadata.json" should match /"name": "librarian-test"/ |
| 12 |
|
| 13 |
Scenario: Install a module with recursive path dependencies |
| 14 |
Given a file named "Puppetfile" with: |
| 15 |
""" |
| 16 |
mod 'librarian/path_dependencies', :path => '../../features/examples/path_dependencies' |
| 17 |
""" |
| 18 |
When I successfully run `librarian-puppet install` |
| 19 |
And the file "modules/path_dependencies/metadata.json" should match /"name": "librarian-path_dependencies"/ |
| 20 |
And the file "modules/test/metadata.json" should match /"name": "librarian-test"/ |
| 21 |
And a file named "modules/stdlib/metadata.json" should exist |
| 22 |
|
| 23 |
Scenario: Install a module with dependencies specified in a Puppetfile and metadata.json |
| 24 |
Given a file named "Puppetfile" with: |
| 25 |
""" |
| 26 |
mod 'librarian/with_puppetfile', :path => '../../features/examples/with_puppetfile_and_metadata_json' |
| 27 |
""" |
| 28 |
When I successfully run `librarian-puppet install` |
| 29 |
And the file "modules/with_puppetfile/metadata.json" should match /"name": "librarian-with_puppetfile_and_metadata_json"/ |
| 30 |
And the file "modules/test/metadata.json" should match /"name": "maestrodev-test"/ |
| 31 |
|
| 32 |
Scenario: Install a module from path without version |
| 33 |
Given a file named "Puppetfile" with: |
| 34 |
""" |
| 35 |
forge "https://forgeapi.puppet.com" |
| 36 |
|
| 37 |
mod 'test', :path => '../../features/examples/dependency_without_version' |
| 38 |
""" |
| 39 |
When I successfully run `librarian-puppet install` |
| 40 |
And the file "modules/test/metadata.json" should match /"version": "0\.0\.1"/ |
| 41 |
And a file named "modules/stdlib/metadata.json" should exist |
| 42 |
|
| 43 |
@spaces |
| 44 |
Scenario: Installing a module in a path with spaces |
| 45 |
Given a file named "Puppetfile" with: |
| 46 |
""" |
| 47 |
mod 'librarian/test', :path => '../../features/examples/test' |
| 48 |
mod 'puppetlabs/stdlib', :git => 'https://github.com/puppetlabs/puppetlabs-stdlib', :ref => 'main' |
| 49 |
""" |
| 50 |
When I successfully run `librarian-puppet install` |
| 51 |
And the file "modules/test/metadata.json" should match /"name": "librarian-test"/ |