diff --git a/charmcraft/application/commands/init.py b/charmcraft/application/commands/init.py index c54c990fe..b7602d876 100644 --- a/charmcraft/application/commands/init.py +++ b/charmcraft/application/commands/init.py @@ -76,9 +76,11 @@ ├── tests │ ├── spread │ │ ├── lib - │ │ │ └── funcs.sh - Helpers for spread testing - │ │ └── minimal - │ │ └── task.yaml - Minimal task definition + │ │ │ ├── cloud-config.yaml + │ │ │ └── test-helpers.yaml + │ │ └── general + │ │ └── integration + │ │ └── task.yaml │ ├── integration │ │ └── test_charm.py - Integration tests │ └── unit diff --git a/charmcraft/templates/init-machine/spread.yaml.j2 b/charmcraft/templates/init-machine/spread.yaml.j2 index fd97f6273..f2ed30dcc 100644 --- a/charmcraft/templates/init-machine/spread.yaml.j2 +++ b/charmcraft/templates/init-machine/spread.yaml.j2 @@ -99,7 +99,7 @@ suites: prepare: | set -e - . "$CRAFT_TEST_LIB_PATH"/funcs.sh + . "$CRAFT_TEST_LIB_PATH"/test-helpers.sh apt update -y apt install -y python3-pip pip3 install tox @@ -113,7 +113,7 @@ suites: restore: | set -e - . "$CRAFT_TEST_LIB_PATH"/funcs.sh + . "$CRAFT_TEST_LIB_PATH"/test-helpers.sh rm -f "$PROJECT_PATH"/*.charm charmcraft clean -p "$PROJECT_PATH" diff --git a/charmcraft/templates/init-machine/tests/spread/lib/funcs.sh.j2 b/charmcraft/templates/init-machine/tests/spread/lib/test-helpers.sh.j2 similarity index 100% rename from charmcraft/templates/init-machine/tests/spread/lib/funcs.sh.j2 rename to charmcraft/templates/init-machine/tests/spread/lib/test-helpers.sh.j2