mirror of
https://github.com/nushell/nushell.git
synced 2025-01-02 20:39:13 +01:00
Fix docker image tests (#14671)
<!-- if this PR closes one or more issues, you can automatically link the PR with them by using one of the [*linking keywords*](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword), e.g. - this PR should close #xxxx - fixes #xxxx you can also mention related issues, PRs or discussions! --> # 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
This commit is contained in:
parent
d3cbcf401f
commit
c29bcc94e7
@ -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<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
|
||||
@ -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: "" }
|
||||
@ -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…
Reference in New Issue
Block a user