File: path.feature

package info (click to toggle)
librarian-puppet 6.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 524 kB
  • sloc: ruby: 1,432; sh: 37; makefile: 9
file content (51 lines) | stat: -rw-r--r-- 2,479 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Feature: cli/install/path
  Puppet librarian needs to install modules from local paths

  Scenario: Install a module with dependencies specified in a Puppetfile
    Given a file named "Puppetfile" with:
    """
    mod 'librarian/with_puppetfile', :path => '../../features/examples/with_puppetfile'
    """
    When I successfully run `librarian-puppet install`
    And the file "modules/with_puppetfile/metadata.json" should match /"name": "librarian-with_puppetfile"/
    And the file "modules/test/metadata.json" should match /"name": "librarian-test"/

  Scenario: Install a module with recursive path dependencies
    Given a file named "Puppetfile" with:
    """
    mod 'librarian/path_dependencies', :path => '../../features/examples/path_dependencies'
    """
    When I successfully run `librarian-puppet install`
    And the file "modules/path_dependencies/metadata.json" should match /"name": "librarian-path_dependencies"/
    And the file "modules/test/metadata.json" should match /"name": "librarian-test"/
    And a file named "modules/stdlib/metadata.json" should exist

  Scenario: Install a module with dependencies specified in a Puppetfile and metadata.json
    Given a file named "Puppetfile" with:
    """
    mod 'librarian/with_puppetfile', :path => '../../features/examples/with_puppetfile_and_metadata_json'
    """
    When I successfully run `librarian-puppet install`
    And the file "modules/with_puppetfile/metadata.json" should match /"name": "librarian-with_puppetfile_and_metadata_json"/
    And the file "modules/test/metadata.json" should match /"name": "maestrodev-test"/

  Scenario: Install a module from path without version
    Given a file named "Puppetfile" with:
    """
    forge "https://forgeapi.puppet.com"

    mod 'test', :path => '../../features/examples/dependency_without_version'
    """
    When I successfully run `librarian-puppet install`
    And the file "modules/test/metadata.json" should match /"version": "0\.0\.1"/
    And a file named "modules/stdlib/metadata.json" should exist

  @spaces
  Scenario: Installing a module in a path with spaces
    Given a file named "Puppetfile" with:
    """
    mod 'librarian/test', :path => '../../features/examples/test'
    mod 'puppetlabs/stdlib', :git => 'https://github.com/puppetlabs/puppetlabs-stdlib', :ref => 'main'
    """
    When I successfully run `librarian-puppet install`
    And the file "modules/test/metadata.json" should match /"name": "librarian-test"/