File: package.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 (48 lines) | stat: -rw-r--r-- 2,083 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
Feature: cli/package
  Puppet librarian needs to package modules

  Scenario: Packaging a forge module
    Given a file named "Puppetfile" with:
    """
    forge "https://forgeapi.puppet.com"

    mod 'puppetlabs/apt', '1.4.0'
    mod 'puppetlabs/stdlib', '4.1.0'
    """
    When I successfully run `librarian-puppet package --verbose`
    And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
    And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
    And the following files should exist:
      | vendor/puppet/cache/puppetlabs-apt-1.4.0.tar.gz    |
      | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz |

  Scenario: Packaging a git module
    Given a file named "Puppetfile" with:
    """
    forge "https://forgeapi.puppet.com"

    mod 'puppetlabs/apt', '1.5.0', :git => 'https://github.com/puppetlabs/puppetlabs-apt.git', :ref => '1.5.0'
    mod 'puppetlabs/stdlib', '4.1.0'
    """
    When I successfully run `librarian-puppet package --verbose`
    And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
    And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
    And the following files should exist:
      | vendor/puppet/source/e5657a61b9ac0dd3c00002c777b0d3c615bb98a5.tar.gz |
      | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz                   |

  @github
  Scenario: Packaging a github tarball module
    Given a file named "Puppetfile" with:
    """
    forge "https://forgeapi.puppet.com"

    mod 'puppetlabs/apt', '1.4.0', :github_tarball => 'puppetlabs/puppetlabs-apt'
    mod 'puppetlabs/stdlib', '4.1.0'
    """
    When I successfully run `librarian-puppet package --verbose`
    And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
    And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
    And the following files should exist:
      | vendor/puppet/cache/puppetlabs-puppetlabs-apt-1.4.0.tar.gz |
      | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz         |