beaker-pe 2.1.5 → 2.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 654d86ee8406653cab9f8283d689e307036d1b06
4
- data.tar.gz: e5d74a9c791c3b8fdf87c9febab261c2a9145b28
3
+ metadata.gz: 2a2d9c6c78aa9f221e4b2bb52d491706c289ba2d
4
+ data.tar.gz: 047895154080e79a127ddcfc6ce1472933c63e45
5
5
  SHA512:
6
- metadata.gz: 083bcb7ef52f8259f645cb65fd18ad62a2478ca27d724fb903abd0419213c7e4e2611295784a0906e41692c6a59e5ffb340e4e5a4c3be18a856e4870ab2ec1de
7
- data.tar.gz: 98e2044e16bc44b3667bfcd27d6897bdf4a547d54ec00f7dca13e33f6f696fac68afc32112a825f5042fe23e513514c5d799a873093156f09d444ef747e4629e
6
+ metadata.gz: 887d9e30921f79f80dc9f841584164077f6d3b56622d6fb85d4618409446f81892bcfd8acdf50711bbb519e8e76a17f3f1d9f032e5cf17d5dbe54a61703a364c
7
+ data.tar.gz: 04321b38d606f86326a9054bd539b03ba088f9708a536c0a5379c89700c8896019783c2377b885e13f418f07ba70ce8841c2c163166f2b5fa30f8e096ab5cc6f
@@ -51,65 +51,11 @@ module Beaker
51
51
  end
52
52
  end
53
53
 
54
- # Taken from puppet acceptance lib
55
- # Install development repos
54
+ # `install_dev_repos_on` is used in various projects in the puppetlabs namespace;
55
+ # when they are all switched to call `install_puppetlabs_dev_repo`, this method
56
+ # can be removed.
56
57
  def install_dev_repos_on(package, host, sha, repo_configs_dir, opts={})
57
- platform = host['platform'] =~ /^(debian|ubuntu)/ ? host['platform'].with_version_codename : host['platform']
58
- platform_configs_dir = File.join(repo_configs_dir, platform)
59
-
60
- case platform
61
- when /^(fedora|el|centos|sles)-(\d+)-(.+)$/
62
- variant = (($1 == 'centos') ? 'el' : $1)
63
- fedora_prefix = ((variant == 'fedora') ? 'f' : '')
64
- version = $2
65
- arch = $3
66
-
67
- pattern = 'pl-%s-%s-%s-%s%s-%s.repo'
68
-
69
- repo_filename = pattern % [
70
- package,
71
- sha,
72
- variant,
73
- fedora_prefix,
74
- version,
75
- arch
76
- ]
77
-
78
- repo = fetch_http_file(
79
- "%s/%s/%s/repo_configs/rpm/" % [opts[:dev_builds_url],package, sha],
80
- repo_filename,
81
- platform_configs_dir
82
- )
83
-
84
- if /sles/i.match(platform)
85
- scp_to(host, repo, '/etc/zypp/repos.d/')
86
- else
87
- scp_to(host, repo, '/etc/yum.repos.d/')
88
- end
89
-
90
- when /^(debian|ubuntu)-([^-]+)-(.+)$/
91
- variant = $1
92
- version = $2
93
- arch = $3
94
-
95
- list = fetch_http_file(
96
- "%s/%s/%s/repo_configs/deb/" % [opts[:dev_builds_url],package, sha],
97
- "pl-%s-%s-%s.list" % [package, sha, version],
98
- platform_configs_dir
99
- )
100
-
101
- scp_to host, list, '/etc/apt/sources.list.d'
102
- # Ubuntu platform gets host['platform'].with_version_codename (see line 57)
103
- if variant == 'ubuntu' && version == 'bionic'
104
- apt_conf_content = 'Acquire::AllowInsecureRepositories "true";'
105
- else
106
- apt_conf_content = 'APT::Get::AllowUnauthenticated "true";'
107
- end
108
- create_remote_file(host, '/etc/apt/apt.conf.d/99trust-all', apt_conf_content)
109
- on host, 'apt-get update'
110
- else
111
- host.logger.notify("No repository installation step for #{platform} yet...")
112
- end
58
+ install_puppetlabs_dev_repo(host, package, sha, repo_configs_dir, opts)
113
59
  end
114
60
  end
115
61
  end
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.1.5'
6
+ STRING = '2.1.6'
7
7
  end
8
8
 
9
9
  end
@@ -31,7 +31,13 @@ describe ClassPEClientToolsMixedWithPatterns do
31
31
  let(:platform) { Beaker::Platform.new('el-6-x86_64') }
32
32
  it 'installs' do
33
33
  hosts.each do |host|
34
- allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/repo_configs/rpm/", "pl-pe-client-tools-#{opts[:pe_client_tools_sha]}-el-6-x86_64.repo", "/tmp/repo_configs/el-6-x86_64")
34
+ expect(subject).to receive(:install_puppetlabs_dev_repo).with(
35
+ host,
36
+ 'pe-client-tools',
37
+ opts[:pe_client_tools_sha],
38
+ '/tmp/repo_configs',
39
+ dev_builds_url: 'http://builds.delivery.puppetlabs.net'
40
+ )
35
41
  expect(host).to receive(:install_package).with("pe-client-tools")
36
42
 
37
43
  subject.install_pe_client_tools_on(host, opts)
@@ -40,7 +46,13 @@ describe ClassPEClientToolsMixedWithPatterns do
40
46
 
41
47
  it 'installs tag versions correctly' do
42
48
  hosts.each do |host|
43
- allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/repo_configs/rpm/", "pl-pe-client-tools-#{tag_opts[:pe_client_tools_version]}-el-6-x86_64.repo", "/tmp/repo_configs/el-6-x86_64")
49
+ expect(subject).to receive(:install_puppetlabs_dev_repo).with(
50
+ host,
51
+ 'pe-client-tools',
52
+ tag_opts[:pe_client_tools_version],
53
+ '/tmp/repo_configs',
54
+ dev_builds_url: 'http://builds.delivery.puppetlabs.net'
55
+ )
44
56
  expect(host).to receive(:install_package).with("pe-client-tools")
45
57
 
46
58
  subject.install_pe_client_tools_on(host, tag_opts)
@@ -52,8 +64,13 @@ describe ClassPEClientToolsMixedWithPatterns do
52
64
  let(:platform) { Beaker::Platform.new('ubuntu-1604-x86_64') }
53
65
  it 'installs' do
54
66
  hosts.each do |host|
55
- allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{opts[:pe_client_tools_sha]}/repo_configs/deb/", "pl-pe-client-tools-#{opts[:pe_client_tools_sha]}-xenial.list", "/tmp/repo_configs/ubuntu-xenial-x86_64")
56
- expect(subject).to receive(:on).with(host, 'apt-get update')
67
+ expect(subject).to receive(:install_puppetlabs_dev_repo).with(
68
+ host,
69
+ 'pe-client-tools',
70
+ opts[:pe_client_tools_sha],
71
+ '/tmp/repo_configs',
72
+ dev_builds_url: 'http://builds.delivery.puppetlabs.net'
73
+ )
57
74
  expect(host).to receive(:install_package).with('pe-client-tools')
58
75
 
59
76
  subject.install_pe_client_tools_on(host, opts)
@@ -62,8 +79,13 @@ describe ClassPEClientToolsMixedWithPatterns do
62
79
 
63
80
  it 'installs tag versions correctly' do
64
81
  hosts.each do |host|
65
- allow(subject). to receive(:fetch_http_file).with("http://builds.delivery.puppetlabs.net/pe-client-tools/#{tag_opts[:pe_client_tools_version]}/repo_configs/deb/", "pl-pe-client-tools-#{tag_opts[:pe_client_tools_version]}-xenial.list", "/tmp/repo_configs/ubuntu-xenial-x86_64")
66
- expect(subject).to receive(:on).with(host, 'apt-get update')
82
+ expect(subject).to receive(:install_puppetlabs_dev_repo).with(
83
+ host,
84
+ 'pe-client-tools',
85
+ tag_opts[:pe_client_tools_version],
86
+ '/tmp/repo_configs',
87
+ dev_builds_url: 'http://builds.delivery.puppetlabs.net'
88
+ )
67
89
  expect(host).to receive(:install_package).with('pe-client-tools')
68
90
 
69
91
  subject.install_pe_client_tools_on(host, tag_opts)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.5
4
+ version: 2.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-15 00:00:00.000000000 Z
11
+ date: 2019-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec