mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-08-28 18:15:42 +00:00
7dd6fc221a
Environment variables are used everywhere in testilb. This environment variables are global variables that define the way testlib behaves. However is was confusing to use the variables because they were inconsistent between each other, for example some variables that define paths would have absolute paths while other would have relative paths, making it error prone while using them. This commit makes the environment variables more consistent by following a name convention for each type of variable, as an example, variables that define absolute paths follow this convention ABS_<path_name>_DIR, while variables that define relative paths are defined like this <path_name>_DIR. Signed-off-by: Castulo Martinez <castulo.martinez@intel.com>
32 lines
840 B
Bash
Executable File
32 lines
840 B
Bash
Executable File
#!/usr/bin/env bats
|
|
|
|
load "../testlib"
|
|
|
|
test_setup() {
|
|
|
|
create_test_environment "$TEST_NAME"
|
|
# create a bundle with a boot file (in /usr/lib/kernel)
|
|
create_bundle -n test-bundle -f /usr/lib/kernel/test-file "$TEST_NAME"
|
|
|
|
}
|
|
|
|
@test "ADD029: Adding a bundle without running the post-update scripts" {
|
|
|
|
run sudo sh -c "$SWUPD bundle-add --no-scripts $SWUPD_OPTS test-bundle"
|
|
assert_status_is 0
|
|
assert_file_exists "$TARGET_DIR/usr/lib/kernel/test-file"
|
|
expected_output=$(cat <<-EOM
|
|
Loading required manifests...
|
|
No packs need to be downloaded
|
|
Validate downloaded files
|
|
Starting download of remaining update content. This may take a while...
|
|
Installing files...
|
|
Warning: post-update helper scripts skipped due to --no-scripts argument
|
|
Successfully installed 1 bundle
|
|
EOM
|
|
)
|
|
assert_is_output "$expected_output"
|
|
|
|
}
|
|
#WEIGHT=2
|