|
579 | 579 | context 'with restart policy set to no' do |
580 | 580 | let(:params) { {'restart' => 'no', 'command' => 'command', 'image' => 'base', 'extra_parameters' => '-c 4'} } |
581 | 581 | it { should contain_exec('run sample with docker') } |
582 | | - it { should contain_exec('run sample with docker').with_unless(/\/var\/run\/docker-sample.cid/) } |
583 | | - it { should contain_exec('run sample with docker').with_unless(/-a/) } |
| 582 | + it { should contain_exec('run sample with docker').with_unless(/sample/) } |
| 583 | + it { should contain_exec('run sample with docker').with_unless(/inspect/) } |
584 | 584 | it { should contain_exec('run sample with docker').with_command(/--cidfile=\/var\/run\/docker-sample.cid/) } |
585 | 585 | it { should contain_exec('run sample with docker').with_command(/-c 4/) } |
586 | 586 | it { should contain_exec('run sample with docker').with_command(/--restart="no"/) } |
|
591 | 591 | context 'with restart policy set to always' do |
592 | 592 | let(:params) { {'restart' => 'always', 'command' => 'command', 'image' => 'base', 'extra_parameters' => '-c 4'} } |
593 | 593 | it { should contain_exec('run sample with docker') } |
594 | | - it { should contain_exec('run sample with docker').with_unless(/\/var\/run\/docker-sample.cid/) } |
595 | | - it { should contain_exec('run sample with docker').with_unless(/-a/) } |
| 594 | + it { should contain_exec('run sample with docker').with_unless(/sample/) } |
| 595 | + it { should contain_exec('run sample with docker').with_unless(/inspect/) } |
596 | 596 | it { should contain_exec('run sample with docker').with_command(/--cidfile=\/var\/run\/docker-sample.cid/) } |
597 | 597 | it { should contain_exec('run sample with docker').with_command(/-c 4/) } |
598 | 598 | it { should contain_exec('run sample with docker').with_command(/--restart="always"/) } |
|
603 | 603 | context 'with restart policy set to on-failure' do |
604 | 604 | let(:params) { {'restart' => 'on-failure', 'command' => 'command', 'image' => 'base', 'extra_parameters' => '-c 4'} } |
605 | 605 | it { should contain_exec('run sample with docker') } |
606 | | - it { should contain_exec('run sample with docker').with_unless(/\/var\/run\/docker-sample.cid/) } |
607 | | - it { should contain_exec('run sample with docker').with_unless(/-a/) } |
| 606 | + it { should contain_exec('run sample with docker').with_unless(/sample/) } |
| 607 | + it { should contain_exec('run sample with docker').with_unless(/inspect/) } |
608 | 608 | it { should contain_exec('run sample with docker').with_command(/--cidfile=\/var\/run\/docker-sample.cid/) } |
609 | 609 | it { should contain_exec('run sample with docker').with_command(/-c 4/) } |
610 | 610 | it { should contain_exec('run sample with docker').with_command(/--restart="on-failure"/) } |
|
615 | 615 | context 'with restart policy set to on-failure:3' do |
616 | 616 | let(:params) { {'restart' => 'on-failure:3', 'command' => 'command', 'image' => 'base', 'extra_parameters' => '-c 4'} } |
617 | 617 | it { should contain_exec('run sample with docker') } |
618 | | - it { should contain_exec('run sample with docker').with_unless(/\/var\/run\/docker-sample.cid/) } |
619 | | - it { should contain_exec('run sample with docker').with_unless(/-a/) } |
| 618 | + it { should contain_exec('run sample with docker').with_unless(/sample/) } |
| 619 | + it { should contain_exec('run sample with docker').with_unless(/inspect/) } |
620 | 620 | it { should contain_exec('run sample with docker').with_command(/--cidfile=\/var\/run\/docker-sample.cid/) } |
621 | 621 | it { should contain_exec('run sample with docker').with_command(/-c 4/) } |
622 | 622 | it { should contain_exec('run sample with docker').with_command(/--restart="on-failure:3"/) } |
|
0 commit comments