compshare-cli 0.5.7__tar.gz → 0.5.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/CHANGELOG.md +4 -0
  2. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/PKG-INFO +1 -1
  3. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/connector/compshare/connector-meta.json +1 -1
  4. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/connector/compshare/mcp.json +1 -1
  5. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/connector/compshare/skills/compshare/SKILL.md +4 -1
  6. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/plugin.json +2 -2
  7. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/skills/compshare-cli/SKILL.md +2 -0
  8. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/__init__.py +1 -1
  9. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/instance.py +43 -35
  10. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/i18n.py +6 -0
  11. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/PKG-INFO +1 -1
  12. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_cli.py +31 -9
  13. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/.agents/plugins/marketplace.json +0 -0
  14. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/LICENSE +0 -0
  15. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/MANIFEST.in +0 -0
  16. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/README.md +0 -0
  17. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/RELEASING.md +0 -0
  18. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/connector/compshare/icon.svg +0 -0
  19. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/connector/compshare/token-schema.json +0 -0
  20. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/pyproject.toml +0 -0
  21. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/setup.cfg +0 -0
  22. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/skills/compshare-cli/agents/openai.yaml +0 -0
  23. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/__main__.py +0 -0
  24. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/actions.py +0 -0
  25. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/api.py +0 -0
  26. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/cli.py +0 -0
  27. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/__init__.py +0 -0
  28. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/bandwidth.py +0 -0
  29. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/common.py +0 -0
  30. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/doctor.py +0 -0
  31. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/image.py +0 -0
  32. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/minimax.py +0 -0
  33. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/storage.py +0 -0
  34. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/commands/team.py +0 -0
  35. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/config.py +0 -0
  36. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/errors.py +0 -0
  37. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/insights.py +0 -0
  38. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/instance_templates.py +0 -0
  39. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/location.py +0 -0
  40. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/mcp_server.py +0 -0
  41. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/output.py +0 -0
  42. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/parsing.py +0 -0
  43. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/remote_jobs.py +0 -0
  44. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/runtime.py +0 -0
  45. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/sdk.py +0 -0
  46. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/ssh.py +0 -0
  47. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli/ssh_cache.py +0 -0
  48. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/SOURCES.txt +0 -0
  49. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/dependency_links.txt +0 -0
  50. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/entry_points.txt +0 -0
  51. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/requires.txt +0 -0
  52. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/src/compshare_cli.egg-info/top_level.txt +0 -0
  53. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_actions.py +0 -0
  54. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_api.py +0 -0
  55. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_bandwidth.py +0 -0
  56. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_cfs.py +0 -0
  57. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_config.py +0 -0
  58. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_insights.py +0 -0
  59. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_instance_templates.py +0 -0
  60. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_location.py +0 -0
  61. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_mcp_server.py +0 -0
  62. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_minimax.py +0 -0
  63. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_minimax_media.py +0 -0
  64. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_output.py +0 -0
  65. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_parsing.py +0 -0
  66. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_release_version.py +0 -0
  67. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_remote_jobs.py +0 -0
  68. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_sdk.py +0 -0
  69. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_ssh.py +0 -0
  70. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_ssh_cache.py +0 -0
  71. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_ssh_integration.py +0 -0
  72. {compshare_cli-0.5.7 → compshare_cli-0.5.8}/tests/test_workbuddy_connector.py +0 -0
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.5.8
6
+
7
+ - 新增 `instance create --skip-capacity-check`,在已指定 GPU 数、CPU 和内存时跳过库存预查,保留询价和 `--max-price` 保护。
8
+
5
9
  ## 0.5.7
6
10
 
7
11
  - 对齐最新 H3 API,允许仅用参考音频创建视频,可省略文本提示词。
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compshare-cli
3
- Version: 0.5.7
3
+ Version: 0.5.8
4
4
  Summary: Command-line client for CompShare GPU compute and MiniMax H3
5
5
  Author: CompShare
6
6
  License-Expression: Apache-2.0
@@ -8,7 +8,7 @@
8
8
  "source": "compshare",
9
9
  "type": "mcp",
10
10
  "auth_mode": "token",
11
- "version": "0.5.7",
11
+ "version": "0.5.8",
12
12
  "minWorkbuddyVersion": "5.0.0",
13
13
  "examples_zh": [
14
14
  "查询上海可用的 RTX 4090 GPU 规格、库存和价格",
@@ -7,7 +7,7 @@
7
7
  "--python",
8
8
  "3.11",
9
9
  "--from",
10
- "compshare-cli[mcp]==0.5.7",
10
+ "compshare-cli[mcp]==0.5.8",
11
11
  "compshare-mcp"
12
12
  ],
13
13
  "env": {
@@ -3,7 +3,7 @@ name: compshare
3
3
  description: Manage CompShare GPU cloud resources and MiniMax H3 media tasks through the controlled CompShare MCP bridge.
4
4
  description_zh: 通过受控 CompShare MCP 桥接查询和管理优云智算 GPU 云资源及 MiniMax H3 视频、图片和语音任务。
5
5
  description_en: Manage CompShare GPU cloud resources and MiniMax H3 media tasks through the controlled CompShare MCP bridge.
6
- version: "0.5.7"
6
+ version: "0.5.8"
7
7
  author: "CompShare"
8
8
  ---
9
9
 
@@ -119,6 +119,9 @@ CLI 本身要求确认的操作仍需在 `args` 中加入 `--yes`。若返回 `o
119
119
  相同的参数移除 `--dry-run`,加入 `--yes`,再调用写工具。不要在没有用户给定价格保护时
120
120
  自行猜测 `--max-price`。
121
121
 
122
+ 用户要求跳过库存预查时,在预演和创建命令中都加入 `--skip-capacity-check`,并指定
123
+ `--count`、`--cpu` 和 `--memory`。询价和 `--max-price` 保护仍然生效。
124
+
122
125
  JSON 创建至少提供 GPU、每实例 GPU 数、CPU、内存、镜像、Region 和 Zone;不要触发交互
123
126
  向导。创建超时后先 `instance list/show`,按幂等标识或创建时间核对,不能立即再次购买。
124
127
 
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://agent-plugins.org/schemas/1.0.0/plugin.schema.json",
3
3
  "name": "compshare-cli",
4
- "version": "0.5.7",
4
+ "version": "0.5.8",
5
5
  "description": "Manage CompShare GPU cloud resources and MiniMax H3 media tasks through the compshare CLI.",
6
6
  "author": {
7
7
  "name": "CompShare"
@@ -25,7 +25,7 @@
25
25
  ]
26
26
  },
27
27
  "publication": {
28
- "release_notes": "Allows audio-only references for MiniMax H3 video, extends IndexTTS speech reference uploads to 30 seconds, and updates media limits, fees, and retention guidance."
28
+ "release_notes": "Adds an option to skip the instance inventory precheck while retaining the price quote and maximum price guard."
29
29
  }
30
30
  }
31
31
  }
@@ -130,6 +130,8 @@ compshare --json instance create \
130
130
 
131
131
  In JSON mode, creation cannot open the interactive wizard. Supply `--gpu`, `--count`, `--cpu`, `--memory`, `--image`, `--region` and `--zone`. Here `--count` is GPUs per instance; `--max-count` is the number of instances.
132
132
 
133
+ When the user requests creation without an inventory precheck, add `--skip-capacity-check` to both the dry run and creation command. Supply `--count`, `--cpu`, and `--memory` through options or a template. The CLI still quotes the price and enforces `--max-price`.
134
+
133
135
  ## Inspect and manage instances
134
136
 
135
137
  ```bash
@@ -1,3 +1,3 @@
1
1
  """CompShare command-line client."""
2
2
 
3
- __version__ = "0.5.7"
3
+ __version__ = "0.5.8"
@@ -1350,6 +1350,11 @@ def create(
1350
1350
  "--cfs/--no-cfs",
1351
1351
  help="Attach existing CFS during container creation; does not purchase storage.",
1352
1352
  ),
1353
+ skip_capacity_check: bool = typer.Option(
1354
+ False,
1355
+ "--skip-capacity-check",
1356
+ help="Skip the inventory precheck. Requires --count, --cpu, and --memory.",
1357
+ ),
1353
1358
  dry_run: bool = typer.Option(
1354
1359
  False,
1355
1360
  "--dry-run",
@@ -1401,6 +1406,9 @@ def create(
1401
1406
  resolved_platform = str(platform if platform is not None else "Auto")
1402
1407
  resolved_max_count = int(max_count if max_count is not None else 1)
1403
1408
  resolved_us3 = bool(us3) if us3 is not None else False
1409
+ if skip_capacity_check and any(value is None for value in (count, cpu, memory)):
1410
+ raise UsageError(tr("--skip-capacity-check requires --count, --cpu, and --memory."))
1411
+
1404
1412
  interactive = any(value is None for value in (gpu, count, cpu, memory, image, region, zone))
1405
1413
  if interactive and state.json_output:
1406
1414
  raise UsageError(
@@ -1437,9 +1445,11 @@ def create(
1437
1445
 
1438
1446
  disks = _disk_list(resolved_boot_disk, resolved_boot_type, data_disk)
1439
1447
  common = {"Region": region, "Zone": selected_zone}
1440
- capacity_params = dict(common)
1441
- capacity_params.update(
1442
- {
1448
+ requested_memory = memory_mib(memory) // 1024 if memory is not None else None
1449
+ selected_spec: Dict[str, Any] = {}
1450
+ if not skip_capacity_check:
1451
+ capacity_params = {
1452
+ **common,
1443
1453
  "GpuType": resolved_gpu,
1444
1454
  "MachineType": "G",
1445
1455
  "MinimalCpuPlatform": resolved_platform,
@@ -1447,36 +1457,34 @@ def create(
1447
1457
  "ChargeType": resolved_charge,
1448
1458
  "Disks": disks,
1449
1459
  }
1450
- )
1451
- capacity = call(state, "CheckCompShareResourceCapacity", capacity_params)
1452
- requested_memory = memory_mib(memory) // 1024 if memory is not None else None
1453
- matching = [
1454
- spec
1455
- for spec in capacity.get("Specs") or []
1456
- if spec.get("ResourceEnough")
1457
- and (count is None or spec.get("Gpu") == count)
1458
- and (cpu is None or spec.get("Cpu") == cpu)
1459
- and (requested_memory is None or spec.get("Mem") == requested_memory)
1460
- ]
1461
- if not matching:
1462
- Renderer(state.json_output, state.show_sensitive).error(
1463
- tr(
1464
- "No inventory is available for the selected GPU, CPU, memory, image, billing, "
1465
- "and disk combination."
1466
- ),
1467
- details={"capacity": capacity},
1468
- )
1469
- raise typer.Exit(2)
1470
-
1471
- selected_spec = matching[0]
1472
- if interactive and any(value is None for value in (count, cpu, memory)):
1473
- selected_spec = _choose(
1474
- "Available specification",
1475
- matching,
1476
- lambda spec: (
1477
- f"GPU ×{spec.get('Gpu')} · {spec.get('Cpu')} CPU · {spec.get('Mem')}GiB memory"
1478
- ),
1479
- )
1460
+ capacity = call(state, "CheckCompShareResourceCapacity", capacity_params)
1461
+ matching = [
1462
+ spec
1463
+ for spec in capacity.get("Specs") or []
1464
+ if spec.get("ResourceEnough")
1465
+ and (count is None or spec.get("Gpu") == count)
1466
+ and (cpu is None or spec.get("Cpu") == cpu)
1467
+ and (requested_memory is None or spec.get("Mem") == requested_memory)
1468
+ ]
1469
+ if not matching:
1470
+ Renderer(state.json_output, state.show_sensitive).error(
1471
+ tr(
1472
+ "No inventory is available for the selected GPU, CPU, memory, image, billing, "
1473
+ "and disk combination."
1474
+ ),
1475
+ details={"capacity": capacity},
1476
+ )
1477
+ raise typer.Exit(2)
1478
+
1479
+ selected_spec = matching[0]
1480
+ if interactive and any(value is None for value in (count, cpu, memory)):
1481
+ selected_spec = _choose(
1482
+ "Available specification",
1483
+ matching,
1484
+ lambda spec: (
1485
+ f"GPU ×{spec.get('Gpu')} · {spec.get('Cpu')} CPU · {spec.get('Mem')}GiB memory"
1486
+ ),
1487
+ )
1480
1488
  resolved_count = int(count if count is not None else selected_spec["Gpu"])
1481
1489
  resolved_cpu = int(cpu if cpu is not None else selected_spec["Cpu"])
1482
1490
  resolved_memory_gib = int(
@@ -1552,7 +1560,7 @@ def create(
1552
1560
  "dry_run": dry_run,
1553
1561
  "max_price": str(price_limit) if price_limit is not None else None,
1554
1562
  "selection": selection,
1555
- "capacity": selected_spec,
1563
+ "capacity": selected_spec or None,
1556
1564
  "price": price,
1557
1565
  "request": create_params,
1558
1566
  }
@@ -1593,7 +1601,7 @@ def create(
1593
1601
  created = call(state, "CreateCompShareInstance", create_params)
1594
1602
  result = {
1595
1603
  "selection": selection,
1596
- "capacity": selected_spec,
1604
+ "capacity": selected_spec or None,
1597
1605
  "price": price,
1598
1606
  "instance": created,
1599
1607
  }
@@ -597,6 +597,9 @@ ZH_TRANSLATIONS: Dict[str, str] = {
597
597
  "Wait for the operation to reach a stable state.": "等待操作进入稳定状态。",
598
598
  "Maximum wait time in seconds.": "最长等待时间(秒)。",
599
599
  "Validate and show the request without changing resources.": "仅校验并显示请求,不变更资源。",
600
+ "Skip the inventory precheck. Requires --count, --cpu, and --memory.": (
601
+ "跳过库存预查。需要指定 --count、--cpu 和 --memory。"
602
+ ),
600
603
  "Operation plan": "操作计划",
601
604
  "Create plan": "创建计划",
602
605
  "Instance details": "实例详情",
@@ -825,6 +828,9 @@ ZH_TRANSLATIONS: Dict[str, str] = {
825
828
  ),
826
829
  "Option --profile requires a value.": "选项 --profile 需要一个值。",
827
830
  "Option --profile may only be specified once.": "选项 --profile 只能指定一次。",
831
+ "--skip-capacity-check requires --count, --cpu, and --memory.": (
832
+ "--skip-capacity-check 需要指定 --count、--cpu 和 --memory。"
833
+ ),
828
834
  (
829
835
  "No inventory is available for the selected GPU, CPU, memory, image, billing, "
830
836
  "and disk combination."
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: compshare-cli
3
- Version: 0.5.7
3
+ Version: 0.5.8
4
4
  Summary: Command-line client for CompShare GPU compute and MiniMax H3
5
5
  Author: CompShare
6
6
  License-Expression: Apache-2.0
@@ -933,6 +933,17 @@ def test_create_json_requires_explicit_parameters(capsys) -> None:
933
933
  assert "--gpu" in payload["error"]["message"]
934
934
 
935
935
 
936
+ def test_create_skip_capacity_check_requires_explicit_spec(capsys) -> None:
937
+ with pytest.raises(SystemExit) as raised:
938
+ cli.main(["--json", "instance", "create", "--skip-capacity-check"])
939
+
940
+ assert raised.value.code == 2
941
+ error = _json_error(capsys.readouterr().out)
942
+ assert error["code"] == "invalid_usage"
943
+ for option in ("--skip-capacity-check", "--count", "--cpu", "--memory"):
944
+ assert option in error["message"]
945
+
946
+
936
947
  def test_local_instance_template_crud() -> None:
937
948
  created = runner.invoke(
938
949
  cli.app,
@@ -1070,7 +1081,8 @@ def test_instance_create_loads_template_and_explicit_options_override(
1070
1081
  ]
1071
1082
 
1072
1083
 
1073
- def test_create_explicit_json_mode_skips_discovery(monkeypatch) -> None:
1084
+ @pytest.mark.parametrize("skip_capacity_check", [False, True])
1085
+ def test_create_explicit_json_mode_skips_discovery(monkeypatch, skip_capacity_check) -> None:
1074
1086
  calls = []
1075
1087
 
1076
1088
  def fake_call(state, action, params):
@@ -1112,6 +1124,7 @@ def test_create_explicit_json_mode_skips_discovery(monkeypatch) -> None:
1112
1124
  "--zone",
1113
1125
  "cn-wlcb-01",
1114
1126
  "--yes",
1127
+ *(["--skip-capacity-check"] if skip_capacity_check else []),
1115
1128
  ],
1116
1129
  env={
1117
1130
  "COMPSHARE_PUBLIC_KEY": "public",
@@ -1120,12 +1133,16 @@ def test_create_explicit_json_mode_skips_discovery(monkeypatch) -> None:
1120
1133
  )
1121
1134
 
1122
1135
  assert result.exit_code == 0, result.output
1123
- assert [action for action, _ in calls] == [
1124
- "CheckCompShareResourceCapacity",
1125
- "GetCompShareInstancePrice",
1126
- "CreateCompShareInstance",
1127
- ]
1128
- assert _json_data(result.stdout)["selection"]["ChargeType"] == "Postpay"
1136
+ expected_actions = ["GetCompShareInstancePrice", "CreateCompShareInstance"]
1137
+ if not skip_capacity_check:
1138
+ expected_actions.insert(0, "CheckCompShareResourceCapacity")
1139
+ assert [action for action, _ in calls] == expected_actions
1140
+ assert calls[-1][1]["GPU"] == 1
1141
+ assert calls[-1][1]["CPU"] == 12
1142
+ assert calls[-1][1]["Memory"] == 32 * 1024
1143
+ payload = _json_data(result.stdout)
1144
+ assert payload["selection"]["ChargeType"] == "Postpay"
1145
+ assert (payload["capacity"] is None) is skip_capacity_check
1129
1146
  assert waits == [("uhost-test", {"region": "cn-wlcb", "desired": {"Running"}, "timeout": 600})]
1130
1147
 
1131
1148
 
@@ -3160,7 +3177,8 @@ def test_batch_lifecycle_reports_partial_failure(monkeypatch) -> None:
3160
3177
  assert payload["error"]["details"]["failed"][0]["instance"] == "host-2"
3161
3178
 
3162
3179
 
3163
- def test_create_max_price_stops_before_create(monkeypatch, capsys) -> None:
3180
+ @pytest.mark.parametrize("skip_capacity_check", [False, True])
3181
+ def test_create_max_price_stops_before_create(monkeypatch, capsys, skip_capacity_check) -> None:
3164
3182
  calls = []
3165
3183
 
3166
3184
  def fake_call(state, action, params):
@@ -3195,11 +3213,15 @@ def test_create_max_price_stops_before_create(monkeypatch, capsys) -> None:
3195
3213
  "--max-price",
3196
3214
  "0.50",
3197
3215
  "--yes",
3216
+ *(["--skip-capacity-check"] if skip_capacity_check else []),
3198
3217
  ]
3199
3218
  )
3200
3219
 
3201
3220
  assert raised.value.code == 2
3202
- assert calls == ["CheckCompShareResourceCapacity", "GetCompShareInstancePrice"]
3221
+ expected_actions = ["GetCompShareInstancePrice"]
3222
+ if not skip_capacity_check:
3223
+ expected_actions.insert(0, "CheckCompShareResourceCapacity")
3224
+ assert calls == expected_actions
3203
3225
  assert "0.7" in _json_error(capsys.readouterr().out)["message"]
3204
3226
 
3205
3227
 
File without changes
File without changes
File without changes
File without changes