-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix report of validation errors in expand-extensions
Fixes #589
- Loading branch information
Showing
3 changed files
with
58 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,9 +15,9 @@ | |
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
"""Fake Extensions for use in tests.""" | ||
import textwrap | ||
from typing import Any | ||
|
||
from craft_application import util | ||
from overrides import override | ||
from rockcraft.extensions.extension import Extension | ||
|
||
|
@@ -103,29 +103,23 @@ def get_parts_snippet(self) -> dict[str, Any]: | |
return {"full-extension/new-part": {"plugin": "nil", "source": None}} | ||
|
||
|
||
FULL_EXTENSION_YAML = textwrap.dedent( | ||
f""" | ||
name: project-with-extensions | ||
version: latest | ||
base: [email protected] | ||
summary: Project with extensions | ||
description: Project with extensions | ||
license: Apache-2.0 | ||
platforms: | ||
amd64: | ||
extensions: | ||
- {FullExtension.NAME} | ||
parts: | ||
foo: | ||
plugin: nil | ||
stage-packages: | ||
- old-package | ||
services: | ||
my-service: | ||
command: foo | ||
override: merge | ||
""" | ||
) | ||
FULL_EXTENSION_PROJECT = { | ||
"name": "project-with-extensions", | ||
"version": "latest", | ||
"base": "[email protected]", | ||
"summary": "Project with extensions", | ||
"description": "Project with extensions", | ||
"license": "Apache-2.0", | ||
"platforms": {"amd64": None}, | ||
"extensions": [FullExtension.NAME], | ||
"parts": {"foo": {"plugin": "nil", "stage-packages": ["old-package"]}}, | ||
"services": { | ||
"my-service": { | ||
"command": "foo", | ||
"override": "merge", | ||
} | ||
}, | ||
} | ||
|
||
|
||
FULL_EXTENSION_YAML = util.dump_yaml(FULL_EXTENSION_PROJECT) |