From c29bcc94e7f009bb76fbba760115409dd79387d9 Mon Sep 17 00:00:00 2001 From: Justin Ma Date: Wed, 25 Dec 2024 08:18:36 +0800 Subject: [PATCH] Fix docker image tests (#14671) # Description Fix the docker image tests failure here for the latest Nu release: https://github.com/nushell/nightly/actions/runs/12476171174/job/34820607683#step:9:19 and the nightly image build failure here: https://github.com/nushell/nightly/actions/runs/12461618928/job/34781443159#step:9:20 I have tested it locally and it should work as expected --- docker/test_docker.nu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/test_docker.nu b/docker/test_docker.nu index c606f9563b..64adbba0c9 100755 --- a/docker/test_docker.nu +++ b/docker/test_docker.nu @@ -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) } }" } @@ -45,7 +45,7 @@ def print_results [results: list>] { } } -def print_summary [results: list>] -> bool { +def print_summary [results: list>]: nothing -> bool { let success = $results | where ($it.result == "PASS") | length let failure = $results | where ($it.result == "FAIL") | length let count = $results | length @@ -57,7 +57,7 @@ def print_summary [results: list>] -> bool } } -def run_test [test: record] -> record { +def run_test [test: record]: nothing -> record { try { do ($test.execute) { result: $"PASS",name: $test.name, error: "" } @@ -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 }