Skip to content

Commit

Permalink
fix(tests): Fix integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gmpinder committed Nov 26, 2024
1 parent f2a4123 commit 816a6a5
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion integration-tests/legacy-test-repo/config/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: cli/test-legacy
description: This is my personal OS image.
base-image: ghcr.io/ublue-os/silverblue-surface
image-version: 39
image-version: gts
modules:
- type: files
files:
Expand Down
4 changes: 2 additions & 2 deletions integration-tests/test-repo/files/scripts/example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ set -oue pipefail
echo 'This is an example shell script'
echo 'Scripts here will run during build if specified in recipe.yml'

get_json_arr FILES '.test' '{"test":[1,2,3]}'
get_json_array FILES '.test[]' '{"test":[1,2,3]}'

echo $FILES
echo "${FILES[@]}"
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
set -euo pipefail

echo "This is a test module"

get_json_array FILES '.test[]' '{"test":[1,2,3]}'

echo "${FILES[@]}"
2 changes: 1 addition & 1 deletion integration-tests/test-repo/recipes/recipe-arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: cli/test
description: This is my personal OS image.
base-image: quay.io/fedora/fedora-silverblue
image-version: 40
image-version: latest
alt-tags:
- arm64
stages: []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ base-image: ghcr.io/ublue-os/silverblue-main
alt-tags:
- gts
- stable
image-version: 39
image-version: gts
modules:
- from-file: akmods.yml
- from-file: flatpaks.yml
Expand Down
2 changes: 1 addition & 1 deletion integration-tests/test-repo/recipes/recipe.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
name: cli/test
description: This is my personal OS image.
base-image: ghcr.io/ublue-os/silverblue-main
image-version: 40
image-version: latest
stages:
- from-file: stages.yml
modules:
Expand Down
10 changes: 5 additions & 5 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ test-docker-build: install-debug-all-features
-S sigstore \
{{ should_push }} \
-vv \
recipes/recipe.yml recipes/recipe-39.yml
recipes/recipe.yml recipes/recipe-gts.yml

# Run arm integration test
test-arm64-build: install-debug-all-features
Expand All @@ -159,7 +159,7 @@ test-docker-build-external-login: install-debug-all-features
-S sigstore \
{{ should_push }} \
-vv \
recipes/recipe.yml recipes/recipe-39.yml
recipes/recipe.yml recipes/recipe-gts.yml

# Run docker driver oauth login integration test
test-docker-build-oauth-login: install-debug-all-features
Expand All @@ -170,7 +170,7 @@ test-docker-build-oauth-login: install-debug-all-features
--retry-push \
{{ should_push }} \
-vv \
recipes/recipe.yml recipes/recipe-39.yml
recipes/recipe.yml recipes/recipe-gts.yml

# Run podman driver integration test
test-podman-build: install-debug-all-features
Expand All @@ -182,7 +182,7 @@ test-podman-build: install-debug-all-features
-S sigstore \
{{ should_push }} \
-vv \
recipes/recipe.yml recipes/recipe-39.yml
recipes/recipe.yml recipes/recipe-gts.yml

# Run buildah driver integration test
test-buildah-build: install-debug-all-features
Expand All @@ -194,7 +194,7 @@ test-buildah-build: install-debug-all-features
-S sigstore \
{{ should_push }} \
-vv \
recipes/recipe.yml recipes/recipe-39.yml
recipes/recipe.yml recipes/recipe-gts.yml

# Run ISO generator for images
test-generate-iso-image: install-debug-all-features
Expand Down
6 changes: 3 additions & 3 deletions src/commands/validate/yaml_span.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ mod test {
#[case("test: value", "", (0, 1))]
#[case("test: value", "/test", (6, 5))]
#[case(RECIPE, "/description", (109, 29))]
#[case(RECIPE, "/image-version", (199, 2))]
#[case(RECIPE, "/modules/4/install", (601, 24))]
#[case(RECIPE, "/modules/7/snippets", (820, 57))]
#[case(RECIPE, "/image-version", (199, 6))]
#[case(RECIPE, "/modules/4/install", (605, 24))]
#[case(RECIPE, "/modules/7/snippets", (824, 57))]
#[case(RECIPE_INVALID, "/image-version", (182, 11))]
#[case(RECIPE_INVALID_STAGE, "/stages/0/from", (262, 8))]
#[case(RECIPE_INVALID_MODULE, "/modules/7/containerfiles", (807, 8))]
Expand Down

0 comments on commit 816a6a5

Please sign in to comment.