def test_git_post_install_systemd(self, check_call, rmtree, copytree,
                                   symlink, exists, join, listdir):
     projects_yaml = openstack_origin_git
     join.return_value = 'joined-string'
     self.git_pip_venv_dir.return_value = '/mnt/openstack-git/venv'
     self.lsb_release.return_value = {'DISTRIB_RELEASE': '15.10'}
     nutils.git_post_install(projects_yaml)
     expected = [
         call('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers',
              {}, perms=288),
         call('git/neutron-server.init.in.template', 'joined-string',
              {'daemon_path': 'joined-string'}, perms=420)
     ]
     self.assertEquals(self.render.call_args_list, expected)
Beispiel #2
0
 def test_git_post_install_systemd(self, check_call, rmtree, copytree,
                                   symlink, exists, join, listdir):
     projects_yaml = openstack_origin_git
     join.return_value = 'joined-string'
     self.git_pip_venv_dir.return_value = '/mnt/openstack-git/venv'
     self.lsb_release.return_value = {'DISTRIB_RELEASE': '15.10'}
     nutils.git_post_install(projects_yaml)
     expected = [
         call('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers',
              {}, perms=288),
         call('git/neutron-server.init.in.template', 'joined-string',
              {'daemon_path': 'joined-string'}, perms=420)
     ]
     self.assertEquals(self.render.call_args_list, expected)
Beispiel #3
0
 def test_git_post_install(self, check_call, rmtree, copytree, symlink,
                           exists, join, venv, render, service_restart,
                           git_src_dir):
     projects_yaml = openstack_origin_git
     join.return_value = 'joined-string'
     venv.return_value = '/mnt/openstack-git/venv'
     nutils.git_post_install(projects_yaml)
     expected = [
         call('joined-string', '/etc/neutron'),
         call('joined-string', '/etc/neutron/plugins'),
         call('joined-string', '/etc/neutron/rootwrap.d'),
     ]
     copytree.assert_has_calls(expected)
     expected = [
         call('joined-string', '/usr/local/bin/neutron-rootwrap'),
         call('joined-string', '/usr/local/bin/neutron-db-manage'),
     ]
     symlink.assert_has_calls(expected, any_order=True)
     neutron_api_context = {
         'service_description': 'Neutron API server',
         'charm_name': 'neutron-api',
         'process_name': 'neutron-server',
         'executable_name': 'joined-string',
     }
     expected = [
         call('git/neutron_sudoers',
              '/etc/sudoers.d/neutron_sudoers', {},
              perms=0o440),
         call('git/upstart/neutron-server.upstart',
              '/etc/init/neutron-server.conf',
              neutron_api_context,
              perms=0o644),
     ]
     self.assertEquals(render.call_args_list, expected)
     expected = [
         call('neutron-server'),
     ]
     self.assertEquals(service_restart.call_args_list, expected)
 def test_git_post_install(self, check_call, rmtree, copytree, symlink,
                           exists, join, venv, render, service_restart,
                           git_src_dir):
     projects_yaml = openstack_origin_git
     join.return_value = 'joined-string'
     venv.return_value = '/mnt/openstack-git/venv'
     nutils.git_post_install(projects_yaml)
     expected = [
         call('joined-string', '/etc/neutron'),
         call('joined-string', '/etc/neutron/plugins'),
         call('joined-string', '/etc/neutron/rootwrap.d'),
     ]
     copytree.assert_has_calls(expected)
     expected = [
         call('joined-string', '/usr/local/bin/neutron-rootwrap'),
         call('joined-string', '/usr/local/bin/neutron-db-manage'),
     ]
     symlink.assert_has_calls(expected, any_order=True)
     neutron_api_context = {
         'service_description': 'Neutron API server',
         'charm_name': 'neutron-api',
         'process_name': 'neutron-server',
         'executable_name': 'joined-string',
     }
     expected = [
         call('git/neutron_sudoers', '/etc/sudoers.d/neutron_sudoers', {},
              perms=0o440),
         call('git/upstart/neutron-server.upstart',
              '/etc/init/neutron-server.conf',
              neutron_api_context, perms=0o644),
     ]
     self.assertEquals(render.call_args_list, expected)
     expected = [
         call('neutron-server'),
     ]
     self.assertEquals(service_restart.call_args_list, expected)