pdqtest 0.1.20 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docker_images/centos/Dockerfile +6 -3
- data/lib/pdqtest/docker.rb +24 -4
- data/lib/pdqtest/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 000ec1d235ba0b6ad374ef81ded2be06e0afd599
|
4
|
+
data.tar.gz: be76b9944535f196fba9535bfa2adcf0bc04c4bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60a7f9d3f0aeeac29618081754420221e27ada958726242e3eb55740157efc2347bcc8db7de4026c16fbf24ad567a3a429cb9085b0f5f43147f967de8fc760ee
|
7
|
+
data.tar.gz: 358f66da0df4815fe27218c9907e850d7fa84a1c405c14970ef705099afc876fbd23ab1b9e433aa2d3bef28911723115ec76254fe6f0c66e834e3d5785ab466b
|
@@ -3,8 +3,8 @@
|
|
3
3
|
# and run without error in an offline environment
|
4
4
|
FROM centos:centos7
|
5
5
|
|
6
|
-
#
|
7
|
-
#
|
6
|
+
# Systemd in docker - state of the art:
|
7
|
+
# https://developers.redhat.com/blog/2016/09/13/running-systemd-in-a-non-privileged-container/
|
8
8
|
ENV container docker
|
9
9
|
RUN yum -y swap -- remove fakesystemd -- install systemd systemd-libs
|
10
10
|
RUN yum -y update; yum clean all; \
|
@@ -17,7 +17,7 @@ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
|
|
17
17
|
rm -f /lib/systemd/system/basic.target.wants/*;\
|
18
18
|
rm -f /lib/systemd/system/anaconda.target.wants/*;
|
19
19
|
VOLUME [ "/sys/fs/cgroup" ]
|
20
|
-
CMD ["/
|
20
|
+
CMD ["/sbin/init"]
|
21
21
|
|
22
22
|
MAINTAINER Geoff Williams <geoff.williams@puppet.com>
|
23
23
|
RUN yum install -y cronie \
|
@@ -64,3 +64,6 @@ RUN /opt/puppetlabs/puppet/bin/gem install git_refresh
|
|
64
64
|
# code under test
|
65
65
|
RUN mkdir /cut
|
66
66
|
VOLUME /cut
|
67
|
+
|
68
|
+
# alternate shudown for systemd
|
69
|
+
STOPSIGNAL SIGRTMIN+3
|
data/lib/pdqtest/docker.rb
CHANGED
@@ -4,7 +4,7 @@ module PDQTest
|
|
4
4
|
ERR = 1
|
5
5
|
STATUS = 2
|
6
6
|
ENV='export TERM=xterm LC_ALL=C PATH=/usr/local/bats/bin:/opt/puppetlabs/puppet/bin:$PATH;'
|
7
|
-
IMAGE_NAME='geoffwilliams/pdqtest-centos:2017-
|
7
|
+
IMAGE_NAME='geoffwilliams/pdqtest-centos:2017-04-04-0'
|
8
8
|
|
9
9
|
|
10
10
|
def self.wrap_cmd(cmd)
|
@@ -18,10 +18,30 @@ module PDQTest
|
|
18
18
|
def self.new_container(test_dir)
|
19
19
|
pwd = Dir.pwd
|
20
20
|
container = ::Docker::Container.create(
|
21
|
-
'Image'
|
22
|
-
'Volumes' => {
|
21
|
+
'Image' => IMAGE_NAME,
|
22
|
+
'Volumes' => {
|
23
|
+
test_dir => {pwd => 'rw'},
|
24
|
+
'/sys/fs/cgroup' => {'/sys/fs/cgroup' => 'ro'},
|
25
|
+
},
|
26
|
+
'HostConfig' => {
|
27
|
+
"Binds": [
|
28
|
+
"/sys/fs/cgroup:/sys/fs/cgroup:ro",
|
29
|
+
"#{pwd}:#{test_dir}:rw",
|
30
|
+
],
|
31
|
+
},
|
32
|
+
)
|
33
|
+
container.start(
|
34
|
+
{
|
35
|
+
#'Binds' => [ pwd +':'+ test_dir,],
|
36
|
+
'HostConfig' => {
|
37
|
+
'Tmpfs': {
|
38
|
+
'/run' => '',
|
39
|
+
'/run/lock' => '',
|
40
|
+
},
|
41
|
+
CapAdd: [ 'SYS_ADMIN'],
|
42
|
+
},
|
43
|
+
}
|
23
44
|
)
|
24
|
-
container.start({'Binds' => [ pwd +':'+ test_dir]})
|
25
45
|
|
26
46
|
container
|
27
47
|
end
|
data/lib/pdqtest/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdqtest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geoff Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|