pdqtest 0.1.20 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ab99ead2e39c691ead4751641d6c53955d5a9fc
4
- data.tar.gz: aa0b635445d674411d51a5258e4b21728d3c76ad
3
+ metadata.gz: 000ec1d235ba0b6ad374ef81ded2be06e0afd599
4
+ data.tar.gz: be76b9944535f196fba9535bfa2adcf0bc04c4bf
5
5
  SHA512:
6
- metadata.gz: 38fbe79fe180945532fc76b78703a20dd8b3727fb6819bac7c4dbba8dea37133c40f5f787e34fa07e907caf505f0a0737c16352197b87c10011d6cc344e69ef9
7
- data.tar.gz: 630af08c40bcc111613e754dc30b53ec03c19578311af08a8027b01e7c05614943d903667d02ddfc3a5d3ce421aa86f80219d0f204eb58ae3218e417640b0cef
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
- # from https://hub.docker.com/r/picoded/centos-systemd/ but switched
7
- # to upstream centos to keep image size down
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 ["/usr/sbin/init"]
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
@@ -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-03-30-0'
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' => IMAGE_NAME,
22
- 'Volumes' => {test_dir => {pwd => 'ro'}},
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
@@ -1,3 +1,3 @@
1
1
  module PDQTest
2
- VERSION = "0.1.20"
2
+ VERSION = "0.2.0"
3
3
  end
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.1.20
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-03 00:00:00.000000000 Z
11
+ date: 2017-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler