Пример #1
0
    def test_parse_status_not_created(self):
        with patch('fabtools.vagrant.local') as mock_local:
            mock_local.return_value = textwrap.dedent("""\
                Current machine states:

                default                   not created

                The VMware machine has not yet been created. Run `vagrant up`
                to create the machine. If a machine is not created, only the
                default provider will be shown. Therefore, if a provider is not listed,
                then the machine is not created for that provider.
                """)
            from fabtools.vagrant import _status_human_readable
            res = _status_human_readable()
            self.assertEqual(res, [('default', 'not created')])
Пример #2
0
    def test_parse_status_not_created(self):
        with patch('fabtools.vagrant.local') as mock_local:
            mock_local.return_value = textwrap.dedent("""\
                Current machine states:

                default                   not created

                The VMware machine has not yet been created. Run `vagrant up`
                to create the machine. If a machine is not created, only the
                default provider will be shown. Therefore, if a provider is not listed,
                then the machine is not created for that provider.
                """)
            from fabtools.vagrant import _status_human_readable
            res = _status_human_readable()
            self.assertEqual(res, [('default', 'not created')])
Пример #3
0
    def test_parse_status_running(self):
        with patch('fabtools.vagrant.local') as mock_local:
            mock_local.return_value = textwrap.dedent("""\
                Current machine states:

                default                   running

                The VM is running. To stop this VM, you can run `vagrant halt` to
                shut it down, or you can run `vagrant suspend` to simply suspend
                the virtual machine. In either case, to restart it again, run
                `vagrant up`.
                """)
            from fabtools.vagrant import _status_human_readable
            res = _status_human_readable()
            self.assertEqual(res, [('default', 'running')])
Пример #4
0
    def test_parse_status_running(self):
        with patch('fabtools.vagrant.local') as mock_local:
            mock_local.return_value = textwrap.dedent("""\
                Current machine states:

                default                   running

                The VM is running. To stop this VM, you can run `vagrant halt` to
                shut it down, or you can run `vagrant suspend` to simply suspend
                the virtual machine. In either case, to restart it again, run
                `vagrant up`.
                """)
            from fabtools.vagrant import _status_human_readable
            res = _status_human_readable()
            self.assertEqual(res, [('default', 'running')])