示例#1
0
    def test_plan(
        self,
        mocker: MockerFixture,
        runway_config: MockRunwayConfig,
        runway_context: MockRunwayContext,
    ) -> None:
        """Test plan."""
        mock_deployment = mocker.patch(f"{MODULE}.components.Deployment")
        deployments = MagicMock()
        obj = Runway(runway_config, runway_context)  # type: ignore

        assert not obj.plan()
        assert runway_context.command == "plan"
        mock_deployment.run_list.assert_called_once_with(
            action="plan",
            context=runway_context,
            deployments=runway_config.deployments,
            future=runway_config.future,
            variables=runway_config.variables,
        )
        assert not obj.plan(deployments)
        mock_deployment.run_list.assert_called_with(
            action="plan",
            context=runway_context,
            deployments=deployments,
            future=runway_config.future,
            variables=runway_config.variables,
        )
示例#2
0
    def test_plan(self, mock_deployment, runway_config, runway_context):
        """Test plan."""
        deployments = MagicMock()
        obj = Runway(runway_config, runway_context)

        assert not obj.plan()
        assert runway_context.command == "plan"
        mock_deployment.run_list.assert_called_once_with(
            action="plan",
            context=runway_context,
            deployments=runway_config.deployments,
            future=runway_config.future,
            variables=runway_config.variables,
        )
        assert not obj.plan(deployments)
        mock_deployment.run_list.assert_called_with(
            action="plan",
            context=runway_context,
            deployments=deployments,
            future=runway_config.future,
            variables=runway_config.variables,
        )