mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 17:22:36 +00:00
chore: merge main into gl/chore/refactor-cli
Resolve conflicts from origin/main: relocate new CLI additions (checkpoint_tui, deploy/validate, remote_template, content_crew templates) into lib/cli, rewrite imports for the standalone crewai-cli package, port main's trained_agents_file param and predeploy validation, and bump python-dotenv/pydantic in crewai-cli to match crewai's constraints. Add the new mark_ephemeral_trace_batch_as_failed method to the relocated crewai.plus_api. Update tests for the new payload field, deploy --skip-validate kwarg, and crewai_cli import paths.
This commit is contained in:
@@ -15,7 +15,14 @@ class TestDeployCommand(unittest.TestCase):
|
||||
@patch("crewai_cli.command.get_auth_token")
|
||||
@patch("crewai_cli.deploy.main.get_project_name")
|
||||
@patch("crewai_cli.command.PlusAPI")
|
||||
def setUp(self, mock_plus_api, mock_get_project_name, mock_get_auth_token):
|
||||
@patch.object(DeployCommand, "_validate_project_structure")
|
||||
def setUp(
|
||||
self,
|
||||
mock_validate_structure,
|
||||
mock_plus_api,
|
||||
mock_get_project_name,
|
||||
mock_get_auth_token,
|
||||
):
|
||||
self.mock_get_auth_token = mock_get_auth_token
|
||||
self.mock_get_project_name = mock_get_project_name
|
||||
self.mock_plus_api = mock_plus_api
|
||||
@@ -125,7 +132,7 @@ class TestDeployCommand(unittest.TestCase):
|
||||
mock_response.json.return_value = {"uuid": "test-uuid"}
|
||||
self.mock_client.deploy_by_uuid.return_value = mock_response
|
||||
|
||||
self.deploy_command.deploy(uuid="test-uuid")
|
||||
self.deploy_command.deploy(uuid="test-uuid", skip_validate=True)
|
||||
|
||||
self.mock_client.deploy_by_uuid.assert_called_once_with("test-uuid")
|
||||
mock_display.assert_called_once_with({"uuid": "test-uuid"})
|
||||
@@ -137,7 +144,7 @@ class TestDeployCommand(unittest.TestCase):
|
||||
mock_response.json.return_value = {"uuid": "test-uuid"}
|
||||
self.mock_client.deploy_by_name.return_value = mock_response
|
||||
|
||||
self.deploy_command.deploy()
|
||||
self.deploy_command.deploy(skip_validate=True)
|
||||
|
||||
self.mock_client.deploy_by_name.assert_called_once_with("test_project")
|
||||
mock_display.assert_called_once_with({"uuid": "test-uuid"})
|
||||
@@ -156,7 +163,7 @@ class TestDeployCommand(unittest.TestCase):
|
||||
self.mock_client.create_crew.return_value = mock_response
|
||||
|
||||
with patch("sys.stdout", new=StringIO()) as fake_out:
|
||||
self.deploy_command.create_crew()
|
||||
self.deploy_command.create_crew(skip_validate=True)
|
||||
self.assertIn("Deployment created successfully!", fake_out.getvalue())
|
||||
self.assertIn("new-uuid", fake_out.getvalue())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user