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

Fix docker image tests #14671

Merged
merged 1 commit into from
Dec 25, 2024
Merged
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
Fix docker image tests
  • Loading branch information
hustcer committed Dec 24, 2024
commit 50cf517e9ec95e38ffa514f4935174afd5cbcd34
8 changes: 4 additions & 4 deletions docker/test_docker.nu
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def main [] {
^$nu.current-exe --commands $"source ($env.CURRENT_FILE); ($plan)"
}

def create_execution_plan [test: string] -> string {
def create_execution_plan [test: string]: nothing -> string {
$"{ name: \"($test)\", execute: { ($test) } }"
}

Expand Down Expand Up @@ -45,7 +45,7 @@ def print_results [results: list<record<name: string, result: string>>] {
}
}

def print_summary [results: list<record<name: string, result: string>>] -> bool {
def print_summary [results: list<record<name: string, result: string>>]: nothing -> bool {
let success = $results | where ($it.result == "PASS") | length
let failure = $results | where ($it.result == "FAIL") | length
let count = $results | length
Expand All @@ -57,7 +57,7 @@ def print_summary [results: list<record<name: string, result: string>>] -> bool
}
}

def run_test [test: record<name: string, execute: closure>] -> record<name: string, result: string, error: string> {
def run_test [test: record<name: string, execute: closure>]: nothing -> record<name: string, result: string, error: string> {
try {
do ($test.execute)
{ result: $"PASS",name: $test.name, error: "" }
Expand Down Expand Up @@ -149,5 +149,5 @@ def "test config initialised" [] {
let config_size = $files | where file == "config.nu" | get size | first

assert greater $env_size 1KiB
assert greater $config_size 10KiB
assert greater $config_size 1KiB
}
Loading