示例#1
0
    def test_install_with_no_cleanup(self, m_readurl, m_subp):
        """Install AIO with no cleanup"""
        cc_puppet.install_puppet_aio(cc_puppet.AIO_INSTALL_URL, None, None,
                                     False)

        self.assertEqual([mock.call([mock.ANY], capture=False)],
                         m_subp.call_args_list)
示例#2
0
    def test_install_with_version(self, m_readurl, m_subp):
        """Install AIO with specific version"""
        cc_puppet.install_puppet_aio(cc_puppet.AIO_INSTALL_URL, '7.6.0')

        self.assertEqual(
            [mock.call([mock.ANY, '-v', '7.6.0', '--cleanup'], capture=False)],
            m_subp.call_args_list)
示例#3
0
    def test_install_with_custom_url(self, m_readurl, m_subp):
        """Install AIO from custom URL"""
        cc_puppet.install_puppet_aio('http://custom.url/path/to/script.sh')
        m_readurl.assert_called_with(url='http://custom.url/path/to/script.sh',
                                     retries=5)

        self.assertEqual([mock.call([mock.ANY, '--cleanup'], capture=False)],
                         m_subp.call_args_list)
示例#4
0
    def test_install_with_default_arguments(self, m_readurl, m_subp):
        """Install AIO with no arguments"""
        cc_puppet.install_puppet_aio()

        self.assertEqual(
            [mock.call([mock.ANY, "--cleanup"], capture=False)],
            m_subp.call_args_list,
        )
示例#5
0
    def test_install_with_collection(self, m_readurl, m_subp):
        """Install AIO with specific collection"""
        cc_puppet.install_puppet_aio(cc_puppet.AIO_INSTALL_URL, None,
                                     'puppet6-nightly')

        self.assertEqual([
            mock.call([mock.ANY, '-c', 'puppet6-nightly', '--cleanup'],
                      capture=False)
        ], m_subp.call_args_list)