|
1 | | -# Copyright 2020-2023 Canonical Ltd. |
| 1 | +# Copyright 2020-2024 Canonical Ltd. |
2 | 2 | # |
3 | 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
4 | 4 | # you may not use this file except in compliance with the License. |
|
30 | 30 | import pytest |
31 | 31 | import responses as responses_module |
32 | 32 | import yaml |
| 33 | +from craft_application import models |
33 | 34 | from craft_parts import callbacks, plugins |
34 | | -from craft_providers import Executor, Provider |
| 35 | +from craft_providers import Executor, Provider, bases |
35 | 36 |
|
36 | 37 | import charmcraft.parts |
37 | | -from charmcraft import const, deprecations, instrum, parts, services |
| 38 | +from charmcraft import const, deprecations, instrum, parts, services, utils |
38 | 39 | from charmcraft.application.main import APP_METADATA |
39 | 40 | from charmcraft.bases import get_host_as_base |
40 | 41 | from charmcraft.models import charmcraft as config_module |
@@ -71,6 +72,19 @@ def service_factory( |
71 | 72 | return factory |
72 | 73 |
|
73 | 74 |
|
| 75 | +@pytest.fixture() |
| 76 | +def default_build_plan(): |
| 77 | + arch = utils.get_host_architecture() |
| 78 | + return [ |
| 79 | + models.BuildInfo( |
| 80 | + base=bases.BaseName("ubuntu", "22.04"), |
| 81 | + build_on=arch, |
| 82 | + build_for=arch, |
| 83 | + platform="distro-1-test64", |
| 84 | + ) |
| 85 | + ] |
| 86 | + |
| 87 | + |
74 | 88 | @pytest.fixture() |
75 | 89 | def fake_project_dir(fs) -> pathlib.Path: |
76 | 90 | project_dir = pathlib.Path("/root/project") |
|
0 commit comments