File tree Expand file tree Collapse file tree 17 files changed +629
-67
lines changed Expand file tree Collapse file tree 17 files changed +629
-67
lines changed Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change
1
+ # @summary Manage the Bazaar source code manager package
2
+ #
3
+ # @param package_name
4
+ # name of package to manage
5
+ #
6
+ # @param package_ensure
7
+ # ensure state of the package resource
8
+ #
9
+ # @example simple include
10
+ # include vcsrepo::manage::bzr
11
+ class vcsrepo::manage::bzr (
12
+ Variant[String[1], Array[String[1]]] $package_name = ' bzr' ,
13
+ String[1] $package_ensure = ' installed' ,
14
+ ) {
15
+ package { $package_name:
16
+ ensure => $package_ensure ,
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # @summary Manage the CVS source code manager package
2
+ #
3
+ # @param package_name
4
+ # name of package to manage
5
+ #
6
+ # @param package_ensure
7
+ # ensure state of the package resource
8
+ #
9
+ # @example simple include
10
+ # include vcsrepo::manage::cvs
11
+ class vcsrepo::manage::cvs (
12
+ Variant[String[1], Array[String[1]]] $package_name = ' cvs' ,
13
+ String[1] $package_ensure = ' installed' ,
14
+ ) {
15
+ package { $package_name:
16
+ ensure => $package_ensure ,
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # @summary Manage the Git source code manager package
2
+ #
3
+ # @param package_name
4
+ # name of package to manage
5
+ #
6
+ # @param package_ensure
7
+ # ensure state of the package resource
8
+ #
9
+ # @example simple include
10
+ # include vcsrepo::manage::git
11
+ class vcsrepo::manage::git (
12
+ Variant[String[1], Array[String[1]]] $package_name = ' git' ,
13
+ String[1] $package_ensure = ' installed' ,
14
+ ) {
15
+ package { $package_name:
16
+ ensure => $package_ensure ,
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # @summary Manage the Mercurial source code manager package
2
+ #
3
+ # @param package_name
4
+ # name of package to manage
5
+ #
6
+ # @param package_ensure
7
+ # ensure state of the package resource
8
+ #
9
+ # @example simple include
10
+ # include vcsrepo::manage::hg
11
+ class vcsrepo::manage::hg (
12
+ Variant[String[1], Array[String[1]]] $package_name = ' mercurial' ,
13
+ String[1] $package_ensure = ' installed' ,
14
+ ) {
15
+ package { $package_name:
16
+ ensure => $package_ensure ,
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # @summary Manage the Subversion source code manager package
2
+ #
3
+ # @param package_name
4
+ # name of package to manage
5
+ #
6
+ # @param package_ensure
7
+ # ensure state of the package resource
8
+ #
9
+ # @example simple include
10
+ # include vcsrepo::manage::svn
11
+ class vcsrepo::manage::svn (
12
+ Variant[String[1], Array[String[1]]] $package_name = ' subversion' ,
13
+ String[1] $package_ensure = ' installed' ,
14
+ ) {
15
+ package { $package_name:
16
+ ensure => $package_ensure ,
17
+ }
18
+ }
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper_acceptance'
4
+
5
+ describe 'vcsrepo::manage::bzr' , unless : [ 'RedHat' , 'SLES' ] . include? ( os [ :family ] ) do
6
+ let ( :pp ) { 'include vcsrepo::manage::bzr' }
7
+
8
+ it 'applies idempotently' do
9
+ idempotent_apply ( pp )
10
+ end
11
+
12
+ it 'installs bzr' do
13
+ expect ( package ( 'bzr' ) ) . to be_installed
14
+ end
15
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper_acceptance'
4
+
5
+ describe 'vcsrepo::manage::cvs' do
6
+ let ( :pp ) { 'include vcsrepo::manage::cvs' }
7
+
8
+ it 'applies idempotently' do
9
+ idempotent_apply ( pp )
10
+ end
11
+
12
+ it 'installs cvs' do
13
+ expect ( package ( 'cvs' ) ) . to be_installed
14
+ end
15
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper_acceptance'
4
+
5
+ describe 'vcsrepo::manage::git' do
6
+ let ( :pp ) { 'include vcsrepo::manage::git' }
7
+
8
+ it 'applies idempotently' do
9
+ idempotent_apply ( pp )
10
+ end
11
+
12
+ it 'installs git' do
13
+ expect ( package ( 'git' ) ) . to be_installed
14
+ end
15
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper_acceptance'
4
+
5
+ describe 'vcsrepo::manage::hg' do
6
+ let ( :pp ) { 'include vcsrepo::manage::hg' }
7
+
8
+ it 'applies idempotently' do
9
+ idempotent_apply ( pp )
10
+ end
11
+
12
+ it 'installs hg' do
13
+ expect ( package ( 'mercurial' ) ) . to be_installed
14
+ end
15
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper_acceptance'
4
+
5
+ describe 'vcsrepo::manage::svn' do
6
+ let ( :pp ) { 'include vcsrepo::manage::svn' }
7
+
8
+ it 'applies idempotently' do
9
+ idempotent_apply ( pp )
10
+ end
11
+
12
+ it 'installs svn' do
13
+ expect ( package ( 'subversion' ) ) . to be_installed
14
+ end
15
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'vcsrepo::manage::bzr' do
6
+ on_supported_os . each do |os , os_facts |
7
+ context "on #{ os } " do
8
+ let ( :facts ) { os_facts }
9
+
10
+ context 'when using defaults' do
11
+ it { is_expected . to compile . with_all_deps }
12
+ it { is_expected . to contain_package ( 'bzr' ) . with_ensure ( 'installed' ) }
13
+ it { is_expected . to have_package_resource_count ( 1 ) }
14
+ end
15
+
16
+ context 'with params' do
17
+ let ( :params ) do
18
+ {
19
+ package_name : 'testing' ,
20
+ package_ensure : 'absent'
21
+ }
22
+ end
23
+
24
+ it { is_expected . to compile . with_all_deps }
25
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'absent' ) }
26
+ it { is_expected . to have_package_resource_count ( 1 ) }
27
+ end
28
+
29
+ context 'with multiple packages' do
30
+ let ( :params ) do
31
+ {
32
+ package_name : [ 'test' , 'testing' ]
33
+ }
34
+ end
35
+
36
+ it { is_expected . to compile . with_all_deps }
37
+ it { is_expected . to contain_package ( 'test' ) . with_ensure ( 'installed' ) }
38
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'installed' ) }
39
+ it { is_expected . to have_package_resource_count ( 2 ) }
40
+ end
41
+ end
42
+ end
43
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'vcsrepo::manage::cvs' do
6
+ on_supported_os . each do |os , os_facts |
7
+ context "on #{ os } " do
8
+ let ( :facts ) { os_facts }
9
+
10
+ context 'when using defaults' do
11
+ it { is_expected . to compile . with_all_deps }
12
+ it { is_expected . to contain_package ( 'cvs' ) . with_ensure ( 'installed' ) }
13
+ it { is_expected . to have_package_resource_count ( 1 ) }
14
+ end
15
+
16
+ context 'with params' do
17
+ let ( :params ) do
18
+ {
19
+ package_name : 'testing' ,
20
+ package_ensure : 'absent'
21
+ }
22
+ end
23
+
24
+ it { is_expected . to compile . with_all_deps }
25
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'absent' ) }
26
+ it { is_expected . to have_package_resource_count ( 1 ) }
27
+ end
28
+
29
+ context 'with multiple packages' do
30
+ let ( :params ) do
31
+ {
32
+ package_name : [ 'test' , 'testing' ]
33
+ }
34
+ end
35
+
36
+ it { is_expected . to compile . with_all_deps }
37
+ it { is_expected . to contain_package ( 'test' ) . with_ensure ( 'installed' ) }
38
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'installed' ) }
39
+ it { is_expected . to have_package_resource_count ( 2 ) }
40
+ end
41
+ end
42
+ end
43
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'vcsrepo::manage::git' do
6
+ on_supported_os . each do |os , os_facts |
7
+ context "on #{ os } " do
8
+ let ( :facts ) { os_facts }
9
+
10
+ context 'when using defaults' do
11
+ it { is_expected . to compile . with_all_deps }
12
+ it { is_expected . to contain_package ( 'git' ) . with_ensure ( 'installed' ) }
13
+ it { is_expected . to have_package_resource_count ( 1 ) }
14
+ end
15
+
16
+ context 'with params' do
17
+ let ( :params ) do
18
+ {
19
+ package_name : 'testing' ,
20
+ package_ensure : 'absent'
21
+ }
22
+ end
23
+
24
+ it { is_expected . to compile . with_all_deps }
25
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'absent' ) }
26
+ it { is_expected . to have_package_resource_count ( 1 ) }
27
+ end
28
+
29
+ context 'with multiple packages' do
30
+ let ( :params ) do
31
+ {
32
+ package_name : [ 'test' , 'testing' ]
33
+ }
34
+ end
35
+
36
+ it { is_expected . to compile . with_all_deps }
37
+ it { is_expected . to contain_package ( 'test' ) . with_ensure ( 'installed' ) }
38
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'installed' ) }
39
+ it { is_expected . to have_package_resource_count ( 2 ) }
40
+ end
41
+ end
42
+ end
43
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'vcsrepo::manage::hg' do
6
+ on_supported_os . each do |os , os_facts |
7
+ context "on #{ os } " do
8
+ let ( :facts ) { os_facts }
9
+
10
+ context 'when using defaults' do
11
+ it { is_expected . to compile . with_all_deps }
12
+ it { is_expected . to contain_package ( 'mercurial' ) . with_ensure ( 'installed' ) }
13
+ it { is_expected . to have_package_resource_count ( 1 ) }
14
+ end
15
+
16
+ context 'with params' do
17
+ let ( :params ) do
18
+ {
19
+ package_name : 'testing' ,
20
+ package_ensure : 'absent'
21
+ }
22
+ end
23
+
24
+ it { is_expected . to compile . with_all_deps }
25
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'absent' ) }
26
+ it { is_expected . to have_package_resource_count ( 1 ) }
27
+ end
28
+
29
+ context 'with multiple packages' do
30
+ let ( :params ) do
31
+ {
32
+ package_name : [ 'test' , 'testing' ]
33
+ }
34
+ end
35
+
36
+ it { is_expected . to compile . with_all_deps }
37
+ it { is_expected . to contain_package ( 'test' ) . with_ensure ( 'installed' ) }
38
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'installed' ) }
39
+ it { is_expected . to have_package_resource_count ( 2 ) }
40
+ end
41
+ end
42
+ end
43
+ end
Original file line number Diff line number Diff line change
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+
5
+ describe 'vcsrepo::manage::svn' do
6
+ on_supported_os . each do |os , os_facts |
7
+ context "on #{ os } " do
8
+ let ( :facts ) { os_facts }
9
+
10
+ context 'when using defaults' do
11
+ it { is_expected . to compile . with_all_deps }
12
+ it { is_expected . to contain_package ( 'subversion' ) . with_ensure ( 'installed' ) }
13
+ it { is_expected . to have_package_resource_count ( 1 ) }
14
+ end
15
+
16
+ context 'with params' do
17
+ let ( :params ) do
18
+ {
19
+ package_name : 'testing' ,
20
+ package_ensure : 'absent'
21
+ }
22
+ end
23
+
24
+ it { is_expected . to compile . with_all_deps }
25
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'absent' ) }
26
+ it { is_expected . to have_package_resource_count ( 1 ) }
27
+ end
28
+
29
+ context 'with multiple packages' do
30
+ let ( :params ) do
31
+ {
32
+ package_name : [ 'test' , 'testing' ]
33
+ }
34
+ end
35
+
36
+ it { is_expected . to compile . with_all_deps }
37
+ it { is_expected . to contain_package ( 'test' ) . with_ensure ( 'installed' ) }
38
+ it { is_expected . to contain_package ( 'testing' ) . with_ensure ( 'installed' ) }
39
+ it { is_expected . to have_package_resource_count ( 2 ) }
40
+ end
41
+ end
42
+ end
43
+ end
You can’t perform that action at this time.
0 commit comments