beaker-docker 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.editorconfig +10 -0
- data/.github/dependabot.yml +9 -0
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/test.yml +58 -49
- data/.gitignore +2 -0
- data/.rubocop.yml +48 -0
- data/.rubocop_todo.yml +572 -0
- data/.simplecov +2 -0
- data/CHANGELOG.md +47 -0
- data/Gemfile +7 -5
- data/Rakefile +40 -137
- data/acceptance/tests/00_default_spec.rb +5 -4
- data/beaker-docker.gemspec +24 -18
- data/bin/beaker-docker +8 -10
- data/lib/beaker/hypervisor/docker.rb +90 -111
- data/lib/beaker-docker/version.rb +3 -1
- data/lib/beaker-docker.rb +1 -0
- data/spec/beaker/hypervisor/docker_spec.rb +48 -9
- data/spec/spec_helper.rb +6 -5
- metadata +79 -25
- data/Gemfile.local +0 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03132260cd467ad7af518c89aaddc34d3c089e49d52480ef23ada59e5d36fece
|
4
|
+
data.tar.gz: '083787caad790afa68a1b9b9217679ace4fecc4f65d4428d73df275260cb9680'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 239659877406dea0df91dc8f15b51d4d0380fc40aa5dd91eed939d8ed4fc11e6fe287990645977f622c26d16d356b94de668fa49ac369f1037aa25e4d61993ec
|
7
|
+
data.tar.gz: 297b9d6d9a8919873cf97055e9b072f36553f4efcee4e770155374f201fc23505cff52068e860ca0db387478ae1d3c8248ea343a1e47d9fbf626741166b47620
|
data/.editorconfig
ADDED
data/.github/dependabot.yml
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
version: 2
|
2
2
|
updates:
|
3
|
+
# raise PRs for gem updates
|
3
4
|
- package-ecosystem: bundler
|
4
5
|
directory: "/"
|
5
6
|
schedule:
|
6
7
|
interval: daily
|
7
8
|
time: "13:00"
|
8
9
|
open-pull-requests-limit: 10
|
10
|
+
|
11
|
+
# Maintain dependencies for GitHub Actions
|
12
|
+
- package-ecosystem: github-actions
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: daily
|
16
|
+
time: "13:00"
|
17
|
+
open-pull-requests-limit: 10
|
data/.github/workflows/test.yml
CHANGED
@@ -1,17 +1,31 @@
|
|
1
1
|
name: Test
|
2
2
|
|
3
3
|
on:
|
4
|
-
|
5
|
-
|
4
|
+
pull_request: {}
|
5
|
+
push:
|
6
|
+
branches:
|
7
|
+
- master
|
6
8
|
|
7
9
|
env:
|
8
10
|
BUNDLE_WITHOUT: release
|
9
11
|
|
10
12
|
jobs:
|
13
|
+
rubocop:
|
14
|
+
runs-on: ubuntu-latest
|
15
|
+
steps:
|
16
|
+
- uses: actions/checkout@v3
|
17
|
+
- name: Install Ruby 3.2
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: "3.2"
|
21
|
+
bundler-cache: true
|
22
|
+
- name: Run Rubocop
|
23
|
+
run: bundle exec rake rubocop
|
24
|
+
|
11
25
|
rspec:
|
12
26
|
runs-on: ubuntu-latest
|
13
27
|
strategy:
|
14
|
-
fail-fast:
|
28
|
+
fail-fast: false
|
15
29
|
matrix:
|
16
30
|
include:
|
17
31
|
- ruby: "2.4"
|
@@ -20,11 +34,13 @@ jobs:
|
|
20
34
|
- ruby: "2.7"
|
21
35
|
- ruby: "3.0"
|
22
36
|
coverage: "yes"
|
37
|
+
- ruby: "3.1"
|
38
|
+
- ruby: "3.2"
|
23
39
|
env:
|
24
40
|
COVERAGE: ${{ matrix.coverage }}
|
25
41
|
name: RSpec - Ruby ${{ matrix.ruby }}
|
26
42
|
steps:
|
27
|
-
- uses: actions/checkout@
|
43
|
+
- uses: actions/checkout@v3
|
28
44
|
- name: Install Ruby ${{ matrix.ruby }}
|
29
45
|
uses: ruby/setup-ruby@v1
|
30
46
|
with:
|
@@ -37,63 +53,56 @@ jobs:
|
|
37
53
|
|
38
54
|
docker:
|
39
55
|
runs-on: ubuntu-latest
|
40
|
-
|
41
|
-
fail-fast: true
|
42
|
-
matrix:
|
43
|
-
ruby:
|
44
|
-
- "2.6"
|
45
|
-
name: Docker - Ruby ${{ matrix.ruby }}
|
56
|
+
name: Docker
|
46
57
|
steps:
|
47
|
-
- uses: actions/checkout@
|
48
|
-
- name: Install Ruby
|
58
|
+
- uses: actions/checkout@v3
|
59
|
+
- name: Install Ruby 3.2
|
49
60
|
uses: ruby/setup-ruby@v1
|
50
61
|
with:
|
51
|
-
ruby-version:
|
62
|
+
ruby-version: "3.2"
|
52
63
|
bundler-cache: true
|
53
|
-
- name: install bundler
|
54
|
-
run: |
|
55
|
-
gem install bundler -v '~> 1.17.3'
|
56
|
-
bundle update
|
57
|
-
- name: install container runtime
|
58
|
-
run: |
|
59
|
-
sudo apt-get remove -y docker docker-engine docker.io containerd runc ||:
|
60
|
-
sudo apt-get update -y
|
61
|
-
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
|
62
|
-
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
63
|
-
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
|
64
|
-
sudo apt-get update -y
|
65
|
-
sudo apt-get install -y docker-ce docker-ce-cli containerd.io
|
66
|
-
sudo systemctl start docker
|
67
64
|
- name: Run acceptance tests
|
68
65
|
run: bundle exec rake test:acceptance
|
69
66
|
|
67
|
+
beaker_in_container:
|
68
|
+
runs-on: ubuntu-latest
|
69
|
+
name: Docker - Beaker in container connection test
|
70
|
+
steps:
|
71
|
+
- uses: actions/checkout@v3
|
72
|
+
# use this and not container key from gha to not have a docker network from github
|
73
|
+
- name: Run Beaker in docker container
|
74
|
+
uses: addnab/docker-run-action@v3
|
75
|
+
with:
|
76
|
+
image: puppet/puppet-dev-tools:2023-02-24-1bca42e
|
77
|
+
options: -v ${{ github.workspace }}:/work
|
78
|
+
run: |
|
79
|
+
cd /work
|
80
|
+
ls -la
|
81
|
+
bundle install
|
82
|
+
export DOCKER_IN_DOCKER=true
|
83
|
+
bundle exec rake test:acceptance
|
84
|
+
|
70
85
|
podman:
|
71
86
|
runs-on: ubuntu-latest
|
72
|
-
|
73
|
-
fail-fast: true
|
74
|
-
matrix:
|
75
|
-
ruby:
|
76
|
-
- "2.6"
|
77
|
-
name: Podman - Ruby ${{ matrix.ruby }}
|
87
|
+
name: Podman
|
78
88
|
steps:
|
79
|
-
- uses: actions/checkout@
|
80
|
-
- name: Install Ruby
|
89
|
+
- uses: actions/checkout@v3
|
90
|
+
- name: Install Ruby 3.2
|
81
91
|
uses: ruby/setup-ruby@v1
|
82
92
|
with:
|
83
|
-
ruby-version:
|
93
|
+
ruby-version: "3.2"
|
84
94
|
bundler-cache: true
|
85
|
-
- name: install bundler
|
86
|
-
run: |
|
87
|
-
gem install bundler -v '~> 1.17.3'
|
88
|
-
bundle update
|
89
|
-
# We need the latest version of podman for this to work
|
90
|
-
- name: install container runtime
|
91
|
-
run: |
|
92
|
-
. /etc/os-release
|
93
|
-
curl -L https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/Release.key | sudo apt-key add -
|
94
|
-
echo "deb https://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${VERSION_ID}/ /" | sudo tee /etc/apt/sources.list.d/podman.list > /dev/null
|
95
|
-
sudo apt-get update
|
96
|
-
sudo apt-get -y install podman
|
97
|
-
sudo systemctl start podman
|
98
95
|
- name: Run acceptance tests
|
99
96
|
run: bundle exec rake test:acceptance
|
97
|
+
|
98
|
+
tests:
|
99
|
+
needs:
|
100
|
+
- docker
|
101
|
+
- beaker_in_container
|
102
|
+
- podman
|
103
|
+
- rubocop
|
104
|
+
- rspec
|
105
|
+
runs-on: ubuntu-latest
|
106
|
+
name: Test suite
|
107
|
+
steps:
|
108
|
+
- run: echo Test suite completed
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# The behavior of RuboCop can be controlled via the .rubocop.yml
|
2
|
+
# configuration file. It makes it possible to enable/disable
|
3
|
+
# certain cops (checks) and to alter their behavior if they accept
|
4
|
+
# any parameters. The file can be placed either in your home
|
5
|
+
# directory or in some project directory.
|
6
|
+
#
|
7
|
+
# RuboCop will start looking for the configuration file in the directory
|
8
|
+
# where the inspected file is and continue its way up to the root directory.
|
9
|
+
#
|
10
|
+
# See https://docs.rubocop.org/rubocop/configuration
|
11
|
+
---
|
12
|
+
inherit_from: .rubocop_todo.yml
|
13
|
+
|
14
|
+
require:
|
15
|
+
- rubocop-performance
|
16
|
+
- rubocop-rake
|
17
|
+
- rubocop-rspec
|
18
|
+
|
19
|
+
AllCops:
|
20
|
+
NewCops: enable
|
21
|
+
DisplayCopNames: true
|
22
|
+
ExtraDetails: true
|
23
|
+
DisplayStyleGuide: true
|
24
|
+
TargetRubyVersion: '2.4'
|
25
|
+
Exclude:
|
26
|
+
- vendor/**/*
|
27
|
+
|
28
|
+
Metrics:
|
29
|
+
Description: Metrics cops are rarely useful
|
30
|
+
Enabled: false
|
31
|
+
|
32
|
+
Style/HashSyntax:
|
33
|
+
Description: Disable temporarily (FIXME)
|
34
|
+
EnforcedStyle: ruby19
|
35
|
+
Enabled: false
|
36
|
+
|
37
|
+
Naming/FileName:
|
38
|
+
Description: Some files violates the snake_case convention
|
39
|
+
Exclude:
|
40
|
+
- 'lib/beaker-docker.rb'
|
41
|
+
|
42
|
+
# Style enforcements
|
43
|
+
Style/TrailingCommaInArrayLiteral:
|
44
|
+
EnforcedStyleForMultiline: consistent_comma
|
45
|
+
Style/IfUnlessModifier:
|
46
|
+
Enabled: false
|
47
|
+
Style/StringLiterals:
|
48
|
+
Enabled: false
|