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

Creates custom files in the test directory #35

Merged
merged 1 commit into from
Jul 10, 2016
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
3 changes: 1 addition & 2 deletions src/_report.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ save_report() {
cat "${REPORT_CURRENT_FILE}" >> "${report_file}"
fi

rm "${REPORT_CURRENT_FILE}"
REPORT_CURRENT_FILE=
}

Expand All @@ -76,7 +75,7 @@ start_new_report() {
distribution="$distribution ($codename)"
fi

REPORT_CURRENT_FILE=$(mktemp)
REPORT_CURRENT_FILE=$(readlink -m "report_line.md")

report_display_column "| Distribution |" "$distribution" >> "${REPORT_CURRENT_FILE}"
report_display_column "| last check date |" "$(date +"%F %T")" >> "${REPORT_CURRENT_FILE}"
Expand Down
10 changes: 3 additions & 7 deletions src/_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

boot_vagrant_box() {
local is_verbose=$1
local output_file=$(mktemp)
local output_file=$(readlink -m "boot_vagrant_box__vagrant_up.out")

printf "* booting vagrant box: "
vagrant up --no-provision &>"${output_file}"
Expand Down Expand Up @@ -35,26 +35,22 @@ create_vagrantfile() {

test_clean_install() {
local is_verbose=$1
local output_file=$(mktemp)
local output_file=$(readlink -m "test_clean_install__vagrant_provision.out")

printf "* Testing clean install: "
vagrant provision &>"${output_file}"
grep -q 'unreachable=0.*failed=0' "${output_file}"
handle_result $? "${output_file}" ${is_verbose} true

rm "${output_file}"
}

test_idempotent() {
local is_verbose=$1
local output_file=$(mktemp)
local output_file=$(readlink -m "test_idempotent__vagrant_provision.out")

printf "* Idempotent test: "
vagrant provision &>"${output_file}"
grep -q 'changed=0.*unreachable=0.*failed=0' "${output_file}"
handle_result $? "${output_file}" ${is_verbose} true

rm "${output_file}"
}

run() {
Expand Down