beaker 5.1.0 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/test.yml +1 -1
- data/.rubocop.yml +7 -3
- data/.rubocop_todo.yml +55 -3
- data/CHANGELOG.md +30 -0
- data/Gemfile +1 -7
- data/Rakefile +0 -122
- data/acceptance/tests/base/dsl/helpers/configuration_test.rb +1 -0
- data/acceptance/tests/base/dsl/helpers/hocon_helpers_test.rb +5 -2
- data/acceptance/tests/base/dsl/helpers/host_helpers/archive_file_from_test.rb +5 -1
- data/acceptance/tests/base/dsl/helpers/host_helpers/backup_the_file_test.rb +3 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/check_for_package_test.rb +6 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/create_remote_file_test.rb +6 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/curl_on_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/echo_on_test.rb +3 -1
- data/acceptance/tests/base/dsl/helpers/host_helpers/on_test.rb +10 -1
- data/acceptance/tests/base/dsl/helpers/host_helpers/retry_on_test.rb +1 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/rsync_to_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_cron_on_test.rb +13 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_on_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/run_script_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/scp_from_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/scp_to_test.rb +2 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/shell_test.rb +5 -0
- data/acceptance/tests/base/dsl/helpers/host_helpers/upgrade_package_test.rb +2 -0
- data/acceptance/tests/base/host/file_test.rb +7 -0
- data/acceptance/tests/base/host/host_test.rb +27 -4
- data/acceptance/tests/base/host_prebuilt_steps/ssh_environment_test.rb +3 -3
- data/acceptance/tests/hypervisor/communication_test.rb +1 -1
- data/beaker.gemspec +8 -7
- data/docs/tutorials/creating_a_test_environment.md +2 -1
- data/lib/beaker/host/aix/file.rb +2 -2
- data/lib/beaker/host/freebsd/pkg.rb +1 -1
- data/lib/beaker/host/pswindows/file.rb +7 -1
- data/lib/beaker/host/unix/exec.rb +1 -1
- data/lib/beaker/host/unix/file.rb +2 -2
- data/lib/beaker/host/windows/file.rb +2 -2
- data/lib/beaker/host.rb +24 -0
- data/lib/beaker/version.rb +1 -1
- metadata +50 -18
@@ -1,7 +1,13 @@
|
|
1
1
|
module PSWindows::File
|
2
2
|
include Beaker::CommandFactory
|
3
3
|
|
4
|
-
def tmpfile(_name = '')
|
4
|
+
def tmpfile(_name = '', extension = nil)
|
5
|
+
if extension
|
6
|
+
# TODO: I do not have access to Windows, but the internet suggests this
|
7
|
+
# $newname = [System.IO.Path]::ChangeExtension($filename, "#{extension}") ; MoveItem $filename $newname
|
8
|
+
raise NotImplementedError, 'Passing an extension is not implemented'
|
9
|
+
end
|
10
|
+
|
5
11
|
result = exec(powershell('[System.IO.Path]::GetTempFileName()'))
|
6
12
|
result.stdout.chomp
|
7
13
|
end
|
@@ -280,7 +280,7 @@ module Unix::Exec
|
|
280
280
|
case self['platform']
|
281
281
|
when /debian|ubuntu|cumulus|huaweios/
|
282
282
|
exec(Beaker::Command.new("service ssh restart"))
|
283
|
-
when /el
|
283
|
+
when /(el|centos|redhat|oracle|scientific)-[7-9]|eos-7|fedora-(1[4-9]|2[0-9]|3[0-9])|archlinux-/
|
284
284
|
exec(Beaker::Command.new("systemctl restart sshd.service"))
|
285
285
|
when /el-|centos|fedora|redhat|oracle|scientific|eos/
|
286
286
|
exec(Beaker::Command.new("/sbin/service sshd restart"))
|
@@ -1,8 +1,8 @@
|
|
1
1
|
module Windows::File
|
2
2
|
include Beaker::CommandFactory
|
3
3
|
|
4
|
-
def tmpfile(name = '')
|
5
|
-
execute("cygpath -m $(mktemp -t #{name}.XXXXXX)")
|
4
|
+
def tmpfile(name = '', extension = nil)
|
5
|
+
execute("cygpath -m $(mktemp -t #{name}.XXXXXX#{extension})")
|
6
6
|
end
|
7
7
|
|
8
8
|
def tmpdir(name = '')
|
data/lib/beaker/host.rb
CHANGED
@@ -547,6 +547,30 @@ module Beaker
|
|
547
547
|
|
548
548
|
raise Beaker::Host::CommandFailure, result.error
|
549
549
|
end
|
550
|
+
|
551
|
+
def tmpfile(name = '')
|
552
|
+
raise NotImplementedError
|
553
|
+
end
|
554
|
+
|
555
|
+
def tmpdir(name = '')
|
556
|
+
raise NotImplementedError
|
557
|
+
end
|
558
|
+
|
559
|
+
def path_split(paths)
|
560
|
+
raise NotImplementedError
|
561
|
+
end
|
562
|
+
|
563
|
+
def rm_rf(path)
|
564
|
+
raise NotImplementedError
|
565
|
+
end
|
566
|
+
|
567
|
+
def install_package(package, cmdline_args = nil, _version = nil, opts = {})
|
568
|
+
raise NotImplementedError
|
569
|
+
end
|
570
|
+
|
571
|
+
def add_env_var(key, val)
|
572
|
+
raise NotImplementedError
|
573
|
+
end
|
550
574
|
end
|
551
575
|
|
552
576
|
%w[
|
data/lib/beaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppet
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-06-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fakefs
|
@@ -53,19 +53,19 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '3.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: voxpupuli-rubocop
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: '1.1'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: '1.1'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitar
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -98,30 +98,62 @@ dependencies:
|
|
98
98
|
name: rexml
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.2'
|
101
104
|
- - ">="
|
102
105
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
106
|
+
version: 3.2.5
|
104
107
|
type: :runtime
|
105
108
|
prerelease: false
|
106
109
|
version_requirements: !ruby/object:Gem::Requirement
|
107
110
|
requirements:
|
111
|
+
- - "~>"
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: '3.2'
|
108
114
|
- - ">="
|
109
115
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
116
|
+
version: 3.2.5
|
111
117
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
118
|
+
name: bcrypt_pbkdf
|
113
119
|
requirement: !ruby/object:Gem::Requirement
|
114
120
|
requirements:
|
115
|
-
- - "
|
121
|
+
- - ">="
|
116
122
|
- !ruby/object:Gem::Version
|
117
123
|
version: '1.0'
|
124
|
+
- - "<"
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '2.0'
|
118
127
|
type: :runtime
|
119
128
|
prerelease: false
|
120
129
|
version_requirements: !ruby/object:Gem::Requirement
|
121
130
|
requirements:
|
122
|
-
- - "
|
131
|
+
- - ">="
|
123
132
|
- !ruby/object:Gem::Version
|
124
133
|
version: '1.0'
|
134
|
+
- - "<"
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '2.0'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: ed25519
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - ">="
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.2'
|
144
|
+
- - "<"
|
145
|
+
- !ruby/object:Gem::Version
|
146
|
+
version: '2.0'
|
147
|
+
type: :runtime
|
148
|
+
prerelease: false
|
149
|
+
version_requirements: !ruby/object:Gem::Requirement
|
150
|
+
requirements:
|
151
|
+
- - ">="
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '1.2'
|
154
|
+
- - "<"
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '2.0'
|
125
157
|
- !ruby/object:Gem::Dependency
|
126
158
|
name: hocon
|
127
159
|
requirement: !ruby/object:Gem::Requirement
|
@@ -174,16 +206,16 @@ dependencies:
|
|
174
206
|
name: net-ssh
|
175
207
|
requirement: !ruby/object:Gem::Requirement
|
176
208
|
requirements:
|
177
|
-
- - "
|
209
|
+
- - "~>"
|
178
210
|
- !ruby/object:Gem::Version
|
179
|
-
version: '
|
211
|
+
version: '7.1'
|
180
212
|
type: :runtime
|
181
213
|
prerelease: false
|
182
214
|
version_requirements: !ruby/object:Gem::Requirement
|
183
215
|
requirements:
|
184
|
-
- - "
|
216
|
+
- - "~>"
|
185
217
|
- !ruby/object:Gem::Version
|
186
|
-
version: '
|
218
|
+
version: '7.1'
|
187
219
|
- !ruby/object:Gem::Dependency
|
188
220
|
name: in-parallel
|
189
221
|
requirement: !ruby/object:Gem::Requirement
|
@@ -242,16 +274,16 @@ dependencies:
|
|
242
274
|
name: beaker-hostgenerator
|
243
275
|
requirement: !ruby/object:Gem::Requirement
|
244
276
|
requirements:
|
245
|
-
- - "
|
277
|
+
- - "~>"
|
246
278
|
- !ruby/object:Gem::Version
|
247
|
-
version: '0'
|
279
|
+
version: '2.0'
|
248
280
|
type: :runtime
|
249
281
|
prerelease: false
|
250
282
|
version_requirements: !ruby/object:Gem::Requirement
|
251
283
|
requirements:
|
252
|
-
- - "
|
284
|
+
- - "~>"
|
253
285
|
- !ruby/object:Gem::Version
|
254
|
-
version: '0'
|
286
|
+
version: '2.0'
|
255
287
|
- !ruby/object:Gem::Dependency
|
256
288
|
name: stringify-hash
|
257
289
|
requirement: !ruby/object:Gem::Requirement
|