mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-12 04:37:51 +02:00
test(cli): preserve standard builds alongside flat mode
This commit is contained in:
@@ -409,10 +409,11 @@ For production use, requires a license key in env var LANGGRAPH_CLOUD_LICENSE_KE
|
||||
help="Custom build command to run from the langgraph.json directory. If not provided, uses default build process.",
|
||||
)
|
||||
@click.option(
|
||||
"--single-user-layer",
|
||||
"--flat",
|
||||
"single_user_layer",
|
||||
is_flag=True,
|
||||
envvar="LANGGRAPH_CLI_SINGLE_USER_LAYER",
|
||||
help="Combine generated Python build steps into one image layer when supported.",
|
||||
envvar="LANGGRAPH_CLI_FLAT",
|
||||
help="Flatten generated Python build steps into one image layer when supported.",
|
||||
)
|
||||
@click.argument("docker_build_args", nargs=-1, type=click.UNPROCESSED)
|
||||
@cli.command(
|
||||
|
||||
@@ -320,6 +320,14 @@ def test_top_level_help_truncates_command_descriptions_to_single_line() -> None:
|
||||
assert "[Beta] List LangSmith Deployments." in deploy_list_line
|
||||
|
||||
|
||||
def test_build_help_includes_flat_option() -> None:
|
||||
result = CliRunner().invoke(cli, ["build", "--help"])
|
||||
|
||||
assert result.exit_code == 0
|
||||
assert "--flat" in result.output
|
||||
assert "--single-user-layer" not in result.output
|
||||
|
||||
|
||||
def test_dev_command_requires_ssl_certfile_and_keyfile_together(tmp_path) -> None:
|
||||
config_path = tmp_path / "langgraph.json"
|
||||
config_path.write_text(
|
||||
|
||||
Reference in New Issue
Block a user