-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: test seeding optional snaps and components from snapd installe…
…r api
- Loading branch information
1 parent
28022b0
commit 5eba35a
Showing
7 changed files
with
125 additions
and
8 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
5 changes: 5 additions & 0 deletions
5
tests/nested/manual/muinstaller-core/comp1/meta/component.yaml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
component: snap-with-comps+comp1 | ||
type: test | ||
version: 1.0 | ||
summary: Component 1 | ||
description: First component for snap-with-comps |
11 changes: 11 additions & 0 deletions
11
tests/nested/manual/muinstaller-core/snap-with-comps/meta/snap.yaml
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: snap-with-comps | ||
version: 1.0 | ||
summary: Snap with components | ||
description: A snap that defines components | ||
base: core22 | ||
components: | ||
comp1: | ||
type: test | ||
apps: | ||
test: | ||
command: test |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/bin/sh -e | ||
|
||
if [ $# -ne 1 ]; then | ||
echo "pass in a component name to check if it is installed" | ||
exit 1 | ||
fi | ||
|
||
if [ ! -f "/snap/${SNAP_NAME}/components/${SNAP_REVISION}/${1}/meta/component.yaml" ]; then | ||
echo "component ${1} is not installed!" | ||
exit 1 | ||
fi | ||
|
||
comp_rev=$(basename "$(readlink -f "/snap/${SNAP_NAME}/components/${SNAP_REVISION}/${1}")") | ||
|
||
echo "component ${1} is installed at revision ${comp_rev}" |
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