예제 #1
0
 def test_can_destroy_all_the_containers_of_a_project(self):
     homedir = os.path.join(FIXTURE_ROOT, 'project03')
     container_options = {
         'name': self.containername('dummytest'), 'image': 'alpine/3.6',
     }
     project = Project(
         'project02', homedir, self.client,
         [Container('myproject', THIS_DIR, self.client, **container_options)],
         provisioning_steps=[])
     project.up()
     project.destroy()
     for container in project.containers:
         assert not container.exists
예제 #2
0
 def test_can_destroy_all_the_containers_of_a_project(self):
     homedir = os.path.join(FIXTURE_ROOT, 'project03')
     container_options = {
         'name': self.containername('dummytest'), 'image': 'ubuntu/xenial', 'mode': 'pull',
         'provisioning': [
             {'type': 'ansible',
              'playbook': os.path.join(THIS_DIR, 'fixtures/provision_with_ansible.yml'), }
         ],
     }
     project = Project(
         'project02', homedir, self.client,
         [Container('myproject', THIS_DIR, self.client, **container_options)])
     project.up()
     project.destroy()
     for container in project.containers:
         assert not container.exists