Esempio n. 1
0
 def test_browse_dcos(self, get_subscription_id):
     acs_info = ContainerService("location", {}, {}, {})
     acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(ContainerServiceOchestratorTypes.dcos)
     
     with mock.patch('azure.cli.command_modules.acs.custom._dcos_browse_internal') as dcos_browse:
         _acs_browse_internal(acs_info, 'resource-group', 'name', False, 'ssh/key/file')
         dcos_browse.assert_called_with(acs_info, False, 'ssh/key/file')
Esempio n. 2
0
    def test_browse_dcos(self, get_subscription_id):
        acs_info = ContainerService("location", {}, {}, {})
        acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(
            ContainerServiceOrchestratorTypes.dcos)

        with mock.patch(
                'azure.cli.command_modules.acs.custom._dcos_browse_internal') as dcos_browse:
            _acs_browse_internal(acs_info, 'resource-group', 'name', False, 'ssh/key/file')
            dcos_browse.assert_called_with(acs_info, False, 'ssh/key/file')
Esempio n. 3
0
 def test_browse_k8s(self, get_subscription_id):
     acs_info = ContainerService("location", {}, {}, {})
     acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(ContainerServiceOchestratorTypes.kubernetes)
     
     with mock.patch('azure.cli.command_modules.acs.custom._get_acs_info', return_value=acs_info) as get_acs_info:
         with mock.patch('azure.cli.command_modules.acs.custom._k8s_browse_internal') as k8s_browse:
             _acs_browse_internal(acs_info, 'resource-group', 'name', False, '')
             get_acs_info.assert_called_with('name', 'resource-group')
             k8s_browse.assert_called_with(acs_info, False)
Esempio n. 4
0
    def test_browse_dcos(self, get_subscription_id):
        acs_info = ContainerService(location="location", orchestrator_profile={}, master_profile={}, linux_profile={})
        acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(
            orchestrator_type=ContainerServiceOrchestratorTypes.dcos)
        client, cmd = mock.MagicMock(), mock.MagicMock()

        with mock.patch(
                'azure.cli.command_modules.acs.custom._dcos_browse_internal') as dcos_browse:
            _acs_browse_internal(client, cmd, acs_info, 'resource-group', 'name', False, 'ssh/key/file')
            dcos_browse.assert_called_with(acs_info, False, 'ssh/key/file')
Esempio n. 5
0
    def test_browse_dcos(self, get_subscription_id):
        acs_info = ContainerService(location="location", orchestrator_profile={}, master_profile={}, linux_profile={})
        acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(
            orchestrator_type=ContainerServiceOrchestratorTypes.dcos)
        client, cmd = mock.MagicMock(), mock.MagicMock()

        with mock.patch(
                'azure.cli.command_modules.acs.custom._dcos_browse_internal') as dcos_browse:
            _acs_browse_internal(client, cmd, acs_info, 'resource-group', 'name', False, 'ssh/key/file')
            dcos_browse.assert_called_with(acs_info, False, 'ssh/key/file')
Esempio n. 6
0
    def test_browse_k8s(self, get_subscription_id):
        acs_info = ContainerService("location", {}, {}, {})
        acs_info.orchestrator_profile = ContainerServiceOrchestratorProfile(
            ContainerServiceOrchestratorTypes.kubernetes)

        with mock.patch('azure.cli.command_modules.acs.custom._get_acs_info',
                        return_value=acs_info) as get_acs_info:
            with mock.patch(
                    'azure.cli.command_modules.acs.custom._k8s_browse_internal') as k8s_browse:
                _acs_browse_internal(acs_info, 'resource-group', 'name', False, 'ssh/key/file')
                get_acs_info.assert_called_with('name', 'resource-group')
                k8s_browse.assert_called_with('name', acs_info, False, 'ssh/key/file')