Debian Codegraph @

features/package.feature

raw
1 Feature: cli/package
2 Puppet librarian needs to package modules
3
4 Scenario: Packaging a forge module
5 Given a file named "Puppetfile" with:
6 """
7 forge "https://forgeapi.puppet.com"
8
9 mod 'puppetlabs/apt', '1.4.0'
10 mod 'puppetlabs/stdlib', '4.1.0'
11 """
12 When I successfully run `librarian-puppet package --verbose`
13 And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
14 And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
15 And the following files should exist:
16 | vendor/puppet/cache/puppetlabs-apt-1.4.0.tar.gz |
17 | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz |
18
19 Scenario: Packaging a git module
20 Given a file named "Puppetfile" with:
21 """
22 forge "https://forgeapi.puppet.com"
23
24 mod 'puppetlabs/apt', '1.5.0', :git => 'https://github.com/puppetlabs/puppetlabs-apt.git', :ref => '1.5.0'
25 mod 'puppetlabs/stdlib', '4.1.0'
26 """
27 When I successfully run `librarian-puppet package --verbose`
28 And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
29 And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
30 And the following files should exist:
31 | vendor/puppet/source/e5657a61b9ac0dd3c00002c777b0d3c615bb98a5.tar.gz |
32 | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz |
33
34 @github
35 Scenario: Packaging a github tarball module
36 Given a file named "Puppetfile" with:
37 """
38 forge "https://forgeapi.puppet.com"
39
40 mod 'puppetlabs/apt', '1.4.0', :github_tarball => 'puppetlabs/puppetlabs-apt'
41 mod 'puppetlabs/stdlib', '4.1.0'
42 """
43 When I successfully run `librarian-puppet package --verbose`
44 And the file "modules/apt/Modulefile" should match /name *'puppetlabs-apt'/
45 And the file "modules/stdlib/metadata.json" should match /"name": "puppetlabs-stdlib"/
46 And the following files should exist:
47 | vendor/puppet/cache/puppetlabs-puppetlabs-apt-1.4.0.tar.gz |
48 | vendor/puppet/cache/puppetlabs-stdlib-4.1.0.tar.gz |