Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rebase for qm_nested patch #512

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/ffi/common/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ run_container_in_qm() {
exec_cmd "${run_ctr_in_qm}"
}

# Agregates 3 functions from this tool to a single init_ffi function, used to initialize environments before tests with a single function, instead of using three separate functions.
init_ffi() {
disk_cleanup
prepare_test
Expand Down
13 changes: 4 additions & 9 deletions tests/ffi/qm_nested/test.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
#!/bin/bash -euvx
#!/bin/bash

# shellcheck disable=SC1091
. ../common/prepare.sh

# init_ffi() uses functions from common.sh to init the env before tests.
init_ffi() {
disk_cleanup
prepare_test
reload_config
}
# init_ffi uses 3in1 function from common.sh to initialize the environment before tests.
init_ffi

# Declare global variables and initialize to 0
# Declare global variables and initialize to "".
NESTED_NAME=""
NESTED_STATUS=""

Expand Down Expand Up @@ -55,7 +51,6 @@ compare_values() {
}

# Execute the functions
init_ffi
create_nested
compare_values

Expand Down