Skip to content

Commit 91c32e2

Browse files
authored
Merge pull request voxpupuli#609 from voxpupuli/modulesync
modulesync 4.1.0
2 parents 0f522f6 + 697a6d9 commit 91c32e2

8 files changed

Lines changed: 53 additions & 81 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -232,33 +232,7 @@ simple tests against it after applying the module. You can run this
232232
with:
233233

234234
```sh
235-
bundle exec rake beaker
236-
```
237-
238-
This will run the tests on the module's default nodeset. You can override the
239-
nodeset used, e.g.,
240-
241-
```sh
242-
BEAKER_set=centos-7-x64 bundle exec rake beaker
243-
```
244-
245-
There are default rake tasks for the various acceptance test modules, e.g.,
246-
247-
```sh
248-
bundle exec rake beaker:centos-7-x64
249-
bundle exec rake beaker:ssh:centos-7-x64
250-
```
251-
252-
If you don't want to have to recreate the virtual machine every time you can
253-
use `BEAKER_destroy=no` and `BEAKER_provision=no`. On the first run you will at
254-
least need `BEAKER_provision` set to yes (the default). The Vagrantfile for the
255-
created virtual machines will be in `.vagrant/beaker_vagrant_files`.
256-
257-
Beaker also supports docker containers. We also use that in our automated CI
258-
pipeline at [travis-ci](http://travis-ci.org). To use that instead of Vagrant:
259-
260-
```sh
261-
PUPPET_INSTALL_TYPE=agent BEAKER_IS_PE=no BEAKER_PUPPET_COLLECTION=puppet6 BEAKER_debug=true BEAKER_setfile=debian10-64{hypervisor=docker} BEAKER_destroy=yes bundle exec rake beaker
235+
BEAKER_setfile=debian10-x64 bundle exec rake beaker
262236
```
263237

264238
You can replace the string `debian10` with any common operating system.
@@ -272,11 +246,7 @@ The following strings are known to work:
272246
* centos7
273247
* centos8
274248

275-
The easiest way to debug in a docker container is to open a shell:
276-
277-
```sh
278-
docker exec -it -u root ${container_id_or_name} bash
279-
```
249+
For more information and tips & tricks, see [voxpupuli-acceptance's documentation](https://github.com/voxpupuli/voxpupuli-acceptance#running-tests).
280250

281251
The source of this file is in our [modulesync_config](https://github.com/voxpupuli/modulesync_config/blob/master/moduleroot/.github/CONTRIBUTING.md.erb)
282252
repository.

.github/workflows/ci.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,13 @@ jobs:
66
setup_matrix:
77
name: 'Setup Test Matrix'
88
runs-on: ubuntu-latest
9+
timeout-minutes: 40
910
outputs:
1011
beaker_setfiles: ${{ steps.get-outputs.outputs.beaker_setfiles }}
1112
puppet_major_versions: ${{ steps.get-outputs.outputs.puppet_major_versions }}
1213
puppet_unit_test_matrix: ${{ steps.get-outputs.outputs.puppet_unit_test_matrix }}
1314
env:
14-
BUNDLE_WITHOUT: development:test:release
15+
BUNDLE_WITHOUT: development:release
1516
steps:
1617
- uses: actions/checkout@v2
1718
- name: Setup ruby
@@ -21,13 +22,16 @@ jobs:
2122
bundler-cache: true
2223
- name: Run rake validate
2324
run: bundle exec rake validate
25+
- name: Run rake rubocop
26+
run: bundle exec rake rubocop
2427
- name: Setup Test Matrix
2528
id: get-outputs
2629
run: bundle exec metadata2gha --use-fqdn --pidfile-workaround false
2730

2831
unit:
2932
needs: setup_matrix
3033
runs-on: ubuntu-latest
34+
timeout-minutes: 40
3135
strategy:
3236
fail-fast: false
3337
matrix:
@@ -58,10 +62,6 @@ jobs:
5862
puppet: ${{fromJson(needs.setup_matrix.outputs.puppet_major_versions)}}
5963
name: ${{ matrix.puppet.name }} - ${{ matrix.setfile.name }}
6064
steps:
61-
- name: Enable IPv6 on docker
62-
run: |
63-
echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
64-
sudo service docker restart
6565
- uses: actions/checkout@v2
6666
- name: Setup ruby
6767
uses: ruby/setup-ruby@v1

.msync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
modulesync_config_version: '4.0.0'
2+
modulesync_config_version: '4.1.0'

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.5.3
1+
FROM ruby:2.7
22

33
WORKDIR /opt/puppet
44

Gemfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ group :system_tests do
1717
end
1818

1919
group :release do
20-
gem 'github_changelog_generator', :require => false, :git => 'https://github.com/voxpupuli/github-changelog-generator', :branch => 'voxpupuli_essential_fixes'
21-
gem 'puppet-blacksmith', :require => false
22-
gem 'voxpupuli-release', :require => false
23-
gem 'puppet-strings', '>= 2.2', :require => false
20+
gem 'github_changelog_generator', '>= 1.16.1', :require => false
21+
gem 'puppet-blacksmith', :require => false
22+
gem 'voxpupuli-release', :require => false
23+
gem 'puppet-strings', '>= 2.2', :require => false
2424
end
2525

2626
gem 'puppetlabs_spec_helper', '~> 2.0', :require => false

spec/acceptance/pip_spec.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,4 +72,3 @@ class { 'python':
7272
its(:stdout) { is_expected.not_to match %r{agent.* 0\.1\.2} }
7373
end
7474
end
75-

spec/classes/python_spec.rb

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -118,41 +118,43 @@
118118

119119
it { is_expected.to contain_python__pyvenv('/opt/env1').with_ensure('present') }
120120
it { is_expected.to contain_python__pyvenv('/opt/env2').with_ensure('present') }
121-
it { is_expected.to contain_exec('python_virtualenv_/opt/env1')
122-
.with(
123-
command: 'python3.8 -m venv --clear /opt/env1 && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade pip && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade setuptools',
124-
user: 'root',
125-
creates: '/opt/env1/bin/activate',
126-
path: [
127-
'/bin',
128-
'/usr/bin',
129-
'/usr/sbin',
130-
'/usr/local/bin'
131-
],
132-
cwd: '/tmp',
133-
environment: [],
134-
timeout: 600,
135-
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env1\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$}
136-
)
137-
.that_requires('File[/opt/env1]')
121+
it {
122+
is_expected.to contain_exec('python_virtualenv_/opt/env1').
123+
with(
124+
command: 'python3.8 -m venv --clear /opt/env1 && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade pip && /opt/env1/bin/pip --log /opt/env1/pip.log install --upgrade setuptools',
125+
user: 'root',
126+
creates: '/opt/env1/bin/activate',
127+
path: [
128+
'/bin',
129+
'/usr/bin',
130+
'/usr/sbin',
131+
'/usr/local/bin'
132+
],
133+
cwd: '/tmp',
134+
environment: [],
135+
timeout: 600,
136+
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env1\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env1/bin/activate$}
137+
).
138+
that_requires('File[/opt/env1]')
138139
}
139-
it { is_expected.to contain_exec('python_virtualenv_/opt/env2')
140-
.with(
141-
command: 'python3.8 -m venv --clear /opt/env2 && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade \'pip <= 20.3.4\' && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade setuptools',
142-
user: 'root',
143-
creates: '/opt/env2/bin/activate',
144-
path: [
145-
'/bin',
146-
'/usr/bin',
147-
'/usr/sbin',
148-
'/usr/local/bin'
149-
],
150-
cwd: '/tmp',
151-
environment: [],
152-
timeout: 600,
153-
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env2\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$}
154-
)
155-
.that_requires('File[/opt/env2]')
140+
it {
141+
is_expected.to contain_exec('python_virtualenv_/opt/env2').
142+
with(
143+
command: 'python3.8 -m venv --clear /opt/env2 && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade \'pip <= 20.3.4\' && /opt/env2/bin/pip --log /opt/env2/pip.log install --upgrade setuptools',
144+
user: 'root',
145+
creates: '/opt/env2/bin/activate',
146+
path: [
147+
'/bin',
148+
'/usr/bin',
149+
'/usr/sbin',
150+
'/usr/local/bin'
151+
],
152+
cwd: '/tmp',
153+
environment: [],
154+
timeout: 600,
155+
unless: %r{^grep '\^\[\\t \]\*VIRTUAL_ENV=\[\\\\'\\\"\]\*/opt/env2\[\\\"\\\\'\]\[\\t \]\*\$' /opt/env2/bin/activate$}
156+
).
157+
that_requires('File[/opt/env2]')
156158
}
157159
it { is_expected.to contain_file('/opt/env1') }
158160
it { is_expected.to contain_file('/opt/env2') }

spec/defines/pip_spec.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'spec_helper'
2-
3-
describe 'python::pip', type: :define do # rubocop:disable RSpec/MultipleDescribes
2+
# rubocop:disable RSpec/MultipleDescribes
3+
describe 'python::pip', type: :define do
44
let(:title) { 'rpyc' }
55

66
context 'on Debian OS' do
@@ -118,7 +118,7 @@
118118
end
119119

120120
context 'passes correct package name' do
121-
let(:params) { { ensure: 'absent', 'pkgname': 'r-pyc' } }
121+
let(:params) { { ensure: 'absent', pkgname: 'r-pyc' } }
122122

123123
it { is_expected.not_to contain_exec('pip_install_rpyc') }
124124

@@ -162,3 +162,4 @@
162162
end
163163
end
164164
end
165+
# rubocop:enable RSpec/MultipleDescribes

0 commit comments

Comments
 (0)