We recommend adding unit tests to all of your components in a project as soon as possible. Implementing unit tests not only ensures that your component works, but it also makes the project more maintainable in the long run as you will be notified when a component breaks.
This page describes how to add a unit test to your component.
Create unit test
Below is an example of how to add a unit test to a Viash component.
#!/bin/bash
## VIASH START
meta_executable = "target/example_bash"
## VIASH END
echo ">>> Create input test file"
echo "foo" > foo.txt
echo ">>> Run executable"
$meta_executable --input foo.txt --output bar.txt
echo ">>> Check whether output file exists"
[[ -f bar.txt ]] ( echo "Output file could not be found!" && exit 1)
echo ">>> Check whether input and output file are the same"
cmp foo.txt bar.tx ( echo "Input and output files are different!" && exit 1)
echo ">>> Test finished successfully"
using System;
using System. IO ;
using System. Diagnostics ;
// VIASH START
var meta = new {
executable = "target/example_csharp"
};
// VIASH END
string inputPath = "foo.txt" ;
string outputPath = "bar.txt" ;
string content = "hello \n there \n " ;
Console. WriteLine ( ">>> Create input test file" );
File. WriteAllText ( inputPath, content);
Console. WriteLine ( ">>> Run executable" );
var startInfo = new ProcessStartInfo ( meta. executable )
{
Arguments = $"--input {inputPath} --output {outputPath}" ,
UseShellExecute = false ,
RedirectStandardOutput = true ,
CreateNoWindow = true
};
using ( var cmd = Process. Start ( startInfo))
{
cmd. WaitForExit ();
}
Console. WriteLine ( ">>> Check whether output file exists" );
if (! File. Exists ( outputPath)) {
Console. WriteLine ( "Output file was not found" );
Environment. Exit ( 1 );
}
Console. WriteLine ( ">>> Check whether input and output file are the same" );
var outputLines = File. ReadAllText ( outputPath);
if ( content != outputLines) {
Console. WriteLine (
"Input and output should be the same \n " +
$"expected content: {content} \n " +
$"found: {outputLines} \n "
);
Environment. Exit ( 1 );
}
Console. WriteLine ( ">>> Test finished successfully" );
const fs = require ('fs' );
const child_process = require ('child_process' );
// VIASH START
let meta = {
'executable' : 'target/example_js'
};
// VIASH END
const inputPath = 'foo.txt' ;
const outputPath = 'bar.txt' ;
const content = 'hello \n there \n ' ;
console . log ('>>> Create input test file' );
fs. writeFileSync (inputPath, content, 'utf8' );
console . log ('>>> Run executable' );
const cmdArgs = [
'--input' , inputPath,
'--output' , outputPath
];
const child = child_process. spawnSync (meta["executable" ], cmdArgs);
if (child. error ) {
console . error (`Error: ${ child. error } ` );
process . exit (1 );
}
console . log ('>>> Check whether output file exists' );
if (! fs. existsSync (outputPath)) {
console . error ('Output file was not found' );
process . exit (1 );
}
console . log ('>>> Check whether input and output file are the same' );
const outputLines = fs. readFileSync (outputPath, 'utf8' );
if (content !== outputLines) {
console . error (
`Input and output should be the same \n ` +
`expected content: ${ content}\n ` +
`found: ${ outputLines}\n `
);
process . exit (1 );
}
console . log ('>>> Test finished successfully' );
import subprocess
import os
input_path = "foo.txt"
output_path = "bar.txt"
content = "hello \n there \n "
## VIASH START
meta = {
"executable" : "target/example_python"
}
## VIASH END
print (">>> Create input test file" )
with open (input_path, "w" ) as file :
file .write(content)
print (">>> Run executable" )
cmd_args = [
meta["executable" ],
"--input" , input_path,
"--output" , output_path
]
subprocess.run(cmd_args, check= True )
print (">>> Check whether output file exists" )
assert os.path.exists(output_path), "Output file was not found"
print (">>> Check whether input and output file are the same" )
with open (output_path, "r" , encoding= "utf8" ) as file :
output_lines = file .read()
assert content == output_lines, \
"Input and output should be the same" \
f"expected content: { content} " \
f"found: { output_lines} "
print (">>> Test finished successfully" )
## VIASH START
meta <- list (
"target/example_r"
)
## VIASH END
input_path <- "foo.txt"
output_path <- "bar.txt"
content <- c ("hello" , "there" )
cat (">>> Create input test file \n " )
writeLines (content, input_path)
cat (">>> Run executable \n " )
system2 (
meta$ executable,
c (
"--input" , input_path,
"--output" , output_path
)
)
cat (">>> Check whether output file exists \n " )
if (! file.exists (output_path)) {
stop ("Output file was not found" )
}
cat (">>> Check whether input and output file are the same \n " )
output_lines <- readLines (output_path)
if (! identical (content, output_lines)) {
stop (paste0 (
"Input and output should be the same \n " ,
"expected content: " , content, " \n " ,
"found: " , output_lines, " \n "
))
}
cat (">>> Test finished successfully \n " )
import scala. sys. process. _
import java. nio. file.{ Files, Paths}
import scala. io. Source
// VIASH START
case class ViashMeta ( executable: String )
val meta = ViashMeta (
"target/example_scala"
)
// VIASH END
val inputPath = Paths. get ( "foo.txt" )
val outputPath = Paths. get ( "bar.txt" )
val content = "hello \n there"
println ( ">>> Create input test file" )
Files. write ( inputPath, content. getBytes ( "UTF-8" ))
println ( ">>> Run executable" )
s"${ meta. executable} --input $inputPath --output $outputPath" .!
println ( ">>> Check whether output file exists" )
assert ( Files. exists ( outputPath), "Output file not found" )
println ( ">>> Check whether input and output file are the same" )
val outputLines = Source . fromFile ( outputPath. toFile ()). getLines. mkString ( " \n " )
assert (
content == outputLines,
s""" Output not the same
expected: ' $content '
found: ' $outputLines '
""" . stripMargin
)
println ( ">>> Test finished successfully" )
Create an input file “foo.txt” with some sample content.
Run an executable file specified in the “meta” dictionary with the arguments “–input foo.txt” and “–output bar.txt”.
Check whether the output file “bar.txt” exists.
Check whether the content of the output file is the same as the content of the input file.
If both checks pass, the script prints “Test finished successfully”.
A test script doesn’t need to be written in the same scripting language as the main script, as long as all of the required dependencies are available. This means the main script could be written in R, but the unit test could be written in Bash.
Add test to config
Next, we need to add the unit test to the test_resources
section in the Viash config.
name : example_bash
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : bash_script
path : script.sh
engines :
- type : docker
image : bash:4.0
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : bash_script
path : test.sh
name : example_csharp
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : csharp_script
path : script.csx
engines :
- type : docker
image : ghcr.io/data-intuitive/dotnet-script:1.3.1
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : csharp_script
path : test.csx
name : example_js
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : javascript_script
path : script.js
engines :
- type : docker
image : node:19-bullseye-slim
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : javascript_script
path : test.js
name : example_python
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : python_script
path : script.py
engines :
- type : docker
image : python:3.10-slim
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : python_script
path : test.py
name : example_r
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : r_script
path : script.R
engines :
- type : docker
image : eddelbuettel/r2u:22.04
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : r_script
path : test.R
name : example_scala
description : A minimal example component.
arguments :
- type : file
name : --input
example : file.txt
required : true
- type : file
name : --output
direction : output
example : output.txt
required : true
resources :
- type : scala_script
path : script.scala
engines :
- type : docker
image : sbtscala/scala-sbt:eclipse-temurin-19_36_1.7.2_2.13.10
- type : native
runners :
- type : executable
- type : nextflow
test_resources :
- type : scala_script
path : test.scala
Note that if you can add multiple unit tests to the test_resources
section, they will all be evaluated. You can also add other resources, similar to what is described in the page on adding resources .
Run the unit test
You can run the unit test as follows:
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_bash_9765738712689586796'
====================================================================
+/tmp/viash_test_example_bash_9765738712689586796/build_engine_environment/example_bash ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_bash:test' with Dockerfile
[info] docker build -t 'example_bash:test' '/tmp/viash_test_example_bash_9765738712689586796/build_engine_environment' -f '/tmp/viash_test_example_bash_9765738712689586796/build_engine_environment/tmp/dockerbuild-example_bash-E8va1P/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 276B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/bash:4.0
#2 DONE 0.6s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/1] FROM docker.io/library/bash:4.0@sha256:ab3c08c2b4c5cad3e962eb29342da7c2230b014bb2e35f8c312b7c30d25c3942
#4 resolve docker.io/library/bash:4.0@sha256:ab3c08c2b4c5cad3e962eb29342da7c2230b014bb2e35f8c312b7c30d25c3942 done
#4 sha256:ab3c08c2b4c5cad3e962eb29342da7c2230b014bb2e35f8c312b7c30d25c3942 10.06kB / 10.06kB done
#4 sha256:ba078d56d902d8618d5abc5c25ffec0cf974b8aab188c422a99b0bc907f2f33e 1.70kB / 1.70kB done
#4 sha256:fac0e40775846dd40e9873bd96d794f782443146b6a259ae6be886f3732e0644 5.47kB / 5.47kB done
#4 sha256:2d35ebdb57d9971fea0cac1582aa78935adf8058b2cc32db163c98822e5dfa1b 0B / 3.80MB 0.1s
#4 sha256:e4659eb918300975775ecbeffd1364fc5a26f3de60bff4d666b51b0e787f7f21 0B / 1.59kB 0.1s
#4 sha256:1c0c4cc8eaf691c6900b2e7478f980718812cfe21ac77ef3d6a8ebe81af6c835 0B / 693.61kB 0.1s
#4 sha256:2d35ebdb57d9971fea0cac1582aa78935adf8058b2cc32db163c98822e5dfa1b 3.80MB / 3.80MB 0.1s done
#4 sha256:e4659eb918300975775ecbeffd1364fc5a26f3de60bff4d666b51b0e787f7f21 1.59kB / 1.59kB 0.2s done
#4 extracting sha256:2d35ebdb57d9971fea0cac1582aa78935adf8058b2cc32db163c98822e5dfa1b 0.1s done
#4 sha256:a19183e3444eb0a12cdcb4e19cd2960cc2718c160188ca6ca66f5f52d4f9a747 0B / 336B 0.2s
#4 sha256:1c0c4cc8eaf691c6900b2e7478f980718812cfe21ac77ef3d6a8ebe81af6c835 693.61kB / 693.61kB 0.3s done
#4 extracting sha256:e4659eb918300975775ecbeffd1364fc5a26f3de60bff4d666b51b0e787f7f21 done
#4 extracting sha256:1c0c4cc8eaf691c6900b2e7478f980718812cfe21ac77ef3d6a8ebe81af6c835 0.0s done
#4 extracting sha256:a19183e3444eb0a12cdcb4e19cd2960cc2718c160188ca6ca66f5f52d4f9a747
#4 sha256:a19183e3444eb0a12cdcb4e19cd2960cc2718c160188ca6ca66f5f52d4f9a747 336B / 336B 0.3s done
#4 extracting sha256:a19183e3444eb0a12cdcb4e19cd2960cc2718c160188ca6ca66f5f52d4f9a747 done
#4 DONE 0.3s
#5 exporting to image
#5 exporting layers done
#5 writing image sha256:bc8cbf67d99e50b6d13b7c48b4b6125c80e307ec486c04e3b63220d7efe61752 done
#5 naming to docker.io/library/example_bash:test done
#5 DONE 0.0s
====================================================================
+/tmp/viash_test_example_bash_9765738712689586796/test_test/test_executable
>>> Create input test file
>>> Run executable
Copying 'foo.txt' to 'bar.txt'.
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_csharp_853127983607586173'
====================================================================
+/tmp/viash_test_example_csharp_853127983607586173/build_engine_environment/example_csharp ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_csharp:test' with Dockerfile
[info] docker build -t 'example_csharp:test' '/tmp/viash_test_example_csharp_853127983607586173/build_engine_environment' -f '/tmp/viash_test_example_csharp_853127983607586173/build_engine_environment/tmp/dockerbuild-example_csharp-MXfFWJ/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 312B done
#1 DONE 0.0s
#2 [internal] load metadata for ghcr.io/data-intuitive/dotnet-script:1.3.1
#2 DONE 1.0s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/1] FROM ghcr.io/data-intuitive/dotnet-script:1.3.1@sha256:d95bf2a2b3e095e5b02960ab4ddd4674d798a1493ed0dc5cf427c77a5ed90ed3
#4 resolve ghcr.io/data-intuitive/dotnet-script:1.3.1@sha256:d95bf2a2b3e095e5b02960ab4ddd4674d798a1493ed0dc5cf427c77a5ed90ed3 done
#4 sha256:3ae3a38ed752842e75d1609c931b29e565b53c24229c87bf1ba64251b5f1f094 0B / 1.74MB 0.1s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 0B / 31.26MB 0.1s
#4 sha256:df9b9388f04ad6279a7410b85cedfdcb2208c0a003da7ab5613af71079148139 0B / 2.81MB 0.1s
#4 sha256:d95bf2a2b3e095e5b02960ab4ddd4674d798a1493ed0dc5cf427c77a5ed90ed3 856B / 856B done
#4 sha256:ae4d45b87ee640aec6f031a1695c6d814e0026ea6fb3220e3daaad90b0f09bda 2.21kB / 2.21kB done
#4 sha256:1102243946aeba437ebb7c7ab5559d465d660ed57a1f13888c89692401cd5bb6 7.71kB / 7.71kB done
#4 extracting sha256:df9b9388f04ad6279a7410b85cedfdcb2208c0a003da7ab5613af71079148139
#4 sha256:3ae3a38ed752842e75d1609c931b29e565b53c24229c87bf1ba64251b5f1f094 1.74MB / 1.74MB 0.3s done
#4 sha256:df9b9388f04ad6279a7410b85cedfdcb2208c0a003da7ab5613af71079148139 2.81MB / 2.81MB 0.3s done
#4 extracting sha256:df9b9388f04ad6279a7410b85cedfdcb2208c0a003da7ab5613af71079148139 0.1s done
#4 sha256:2c56128c63bdf4a1d571ed930304f4eb77e8e2fde7ce03ddf6073e3df9abf8ad 0B / 8.65MB 0.4s
#4 sha256:6c2be99410893469a9e0d8f0ff537b22f651479bf64c5dcf269d2e5267e85749 0B / 20.91MB 0.4s
#4 extracting sha256:3ae3a38ed752842e75d1609c931b29e565b53c24229c87bf1ba64251b5f1f094
#4 extracting sha256:3ae3a38ed752842e75d1609c931b29e565b53c24229c87bf1ba64251b5f1f094 0.1s done
#4 sha256:6c2be99410893469a9e0d8f0ff537b22f651479bf64c5dcf269d2e5267e85749 12.58MB / 20.91MB 0.7s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 2.10MB / 31.26MB 0.9s
#4 sha256:6c2be99410893469a9e0d8f0ff537b22f651479bf64c5dcf269d2e5267e85749 20.91MB / 20.91MB 0.8s done
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 0B / 105.91MB 0.9s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 12.58MB / 31.26MB 1.1s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 15.73MB / 31.26MB 1.2s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 12.58MB / 105.91MB 1.2s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 24.12MB / 31.26MB 1.4s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 23.07MB / 105.91MB 1.4s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 30.41MB / 31.26MB 1.6s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 33.55MB / 105.91MB 1.6s
#4 sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 31.26MB / 31.26MB 1.6s done
#4 extracting sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 0.1s
#4 sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 0B / 12.80MB 1.7s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 45.09MB / 105.91MB 1.8s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 51.38MB / 105.91MB 1.9s
#4 sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 2.10MB / 12.80MB 1.9s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 62.91MB / 105.91MB 2.1s
#4 extracting sha256:d772c6b09cca24a6ec7cb06facff8b7be509b608330bd035f91b70388a94d3b4 0.4s done
#4 sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 7.34MB / 12.80MB 2.1s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 74.53MB / 105.91MB 2.3s
#4 sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 11.53MB / 12.80MB 2.3s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 80.74MB / 105.91MB 2.4s
#4 sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 12.80MB / 12.80MB 2.4s done
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 0B / 68.90MB 2.4s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 92.27MB / 105.91MB 2.6s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 98.57MB / 105.91MB 2.7s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 104.86MB / 105.91MB 2.8s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 4.19MB / 68.90MB 2.8s
#4 sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 105.91MB / 105.91MB 2.8s done
#4 sha256:16def9f17d8d9988a074a1d3ae42cb041b261068b3a455c99141bb8df243e9a4 0B / 829.24kB 2.9s
#4 sha256:16def9f17d8d9988a074a1d3ae42cb041b261068b3a455c99141bb8df243e9a4 829.24kB / 829.24kB 3.1s done
#4 sha256:03ac08f8f1d3c646d8f456ad0e2307b56511e692bcef7a4d67ec194ba81f59e7 0B / 103B 3.1s
#4 sha256:2c56128c63bdf4a1d571ed930304f4eb77e8e2fde7ce03ddf6073e3df9abf8ad 6.29MB / 8.65MB 3.3s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 12.58MB / 68.90MB 3.3s
#4 sha256:03ac08f8f1d3c646d8f456ad0e2307b56511e692bcef7a4d67ec194ba81f59e7 103B / 103B 3.2s done
#4 sha256:2c56128c63bdf4a1d571ed930304f4eb77e8e2fde7ce03ddf6073e3df9abf8ad 8.65MB / 8.65MB 3.3s done
#4 extracting sha256:2c56128c63bdf4a1d571ed930304f4eb77e8e2fde7ce03ddf6073e3df9abf8ad 0.1s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 16.78MB / 68.90MB 3.5s
#4 extracting sha256:2c56128c63bdf4a1d571ed930304f4eb77e8e2fde7ce03ddf6073e3df9abf8ad 0.1s done
#4 extracting sha256:6c2be99410893469a9e0d8f0ff537b22f651479bf64c5dcf269d2e5267e85749 0.1s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 22.02MB / 68.90MB 3.7s
#4 extracting sha256:6c2be99410893469a9e0d8f0ff537b22f651479bf64c5dcf269d2e5267e85749 0.2s done
#4 extracting sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 28.31MB / 68.90MB 3.9s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 32.51MB / 68.90MB 4.1s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 37.75MB / 68.90MB 4.2s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 44.04MB / 68.90MB 4.4s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 48.23MB / 68.90MB 4.5s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 52.43MB / 68.90MB 4.6s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 59.77MB / 68.90MB 4.8s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 63.96MB / 68.90MB 4.9s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 68.16MB / 68.90MB 5.0s
#4 sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 68.90MB / 68.90MB 5.0s done
#4 extracting sha256:5a0c86bcd85d690fae1d36f59c4041c4142835310a431e3f1b00446763d7db73 1.9s done
#4 extracting sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383
#4 extracting sha256:5e733ff9c30825005ec05ee10b784276e8034171be7eeaa10d6f876fc7bb5383 0.3s done
#4 extracting sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 0.1s
#4 extracting sha256:4937da28ea60b32af53a8d507ea830228a05f22a7be2ae1ef0134bcd0e3bafba 0.5s done
#4 extracting sha256:16def9f17d8d9988a074a1d3ae42cb041b261068b3a455c99141bb8df243e9a4
#4 extracting sha256:16def9f17d8d9988a074a1d3ae42cb041b261068b3a455c99141bb8df243e9a4 0.0s done
#4 extracting sha256:03ac08f8f1d3c646d8f456ad0e2307b56511e692bcef7a4d67ec194ba81f59e7 done
#4 DONE 7.0s
#5 exporting to image
#5 exporting layers done
#5 writing image sha256:7f3bafed5d0797f0ce48052097a4d7e4bde053645be83ad205c01f5096129d17 done
#5 naming to docker.io/library/example_csharp:test done
#5 DONE 0.0s
====================================================================
+/tmp/viash_test_example_csharp_853127983607586173/test_test/test_executable
>>> Create input test file
>>> Run executable
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_js_11714609301584302876'
====================================================================
+/tmp/viash_test_example_js_11714609301584302876/build_engine_environment/example_js ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_js:test' with Dockerfile
[info] docker build -t 'example_js:test' '/tmp/viash_test_example_js_11714609301584302876/build_engine_environment' -f '/tmp/viash_test_example_js_11714609301584302876/build_engine_environment/tmp/dockerbuild-example_js-VUZb9n/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 287B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/library/node:19-bullseye-slim
#2 DONE 0.6s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/1] FROM docker.io/library/node:19-bullseye-slim@sha256:f58f1fcf5c9ff9e3752993edb4ed6dbd35697124c85a43f3b97aa054500b0534
#4 resolve docker.io/library/node:19-bullseye-slim@sha256:f58f1fcf5c9ff9e3752993edb4ed6dbd35697124c85a43f3b97aa054500b0534 done
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 0B / 46.62MB 0.1s
#4 sha256:f58f1fcf5c9ff9e3752993edb4ed6dbd35697124c85a43f3b97aa054500b0534 1.21kB / 1.21kB done
#4 sha256:63b5ca0f90dbaf64465a83d46276e133eab30410f642808d158bf98928811999 1.37kB / 1.37kB done
#4 sha256:adbc02574b521bb652d771c8ac0282c724b9fe90c001f3bab0825c32092c9036 6.84kB / 6.84kB done
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 0B / 31.40MB 0.1s
#4 sha256:0bfad7312c25e414fc3d0e3640a77bd4b5c74d2118595670999afef9758cb49b 0B / 4.19kB 0.1s
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 4.19MB / 31.40MB 0.2s
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 16.78MB / 31.40MB 0.4s
#4 sha256:0bfad7312c25e414fc3d0e3640a77bd4b5c74d2118595670999afef9758cb49b 4.19kB / 4.19kB 0.2s done
#4 sha256:477c7ebfb8500396b86c69952acb17b909a0a63da41e03dd4046e2c809722c6e 1.05MB / 2.76MB 0.4s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 8.39MB / 46.62MB 0.5s
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 20.97MB / 31.40MB 0.5s
#4 sha256:477c7ebfb8500396b86c69952acb17b909a0a63da41e03dd4046e2c809722c6e 2.76MB / 2.76MB 0.4s done
#4 sha256:8bb4aa3e51be63d4a2e5bd30ab9cd478a916ed3c5c0212a44b96fd743e0e0f2f 0B / 450B 0.5s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 11.53MB / 46.62MB 0.6s
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 30.41MB / 31.40MB 0.6s
#4 sha256:8bb4aa3e51be63d4a2e5bd30ab9cd478a916ed3c5c0212a44b96fd743e0e0f2f 450B / 450B 0.5s done
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 15.73MB / 46.62MB 0.7s
#4 sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 31.40MB / 31.40MB 0.6s done
#4 extracting sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 0.1s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 20.97MB / 46.62MB 0.8s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 27.26MB / 46.62MB 0.9s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 32.51MB / 46.62MB 1.0s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 37.75MB / 46.62MB 1.1s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 46.14MB / 46.62MB 1.2s
#4 sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 46.62MB / 46.62MB 1.2s done
#4 extracting sha256:f03b40093957615593f2ed142961afb6b540507e0b47e3f7626ba5e02efbbbf1 1.2s done
#4 extracting sha256:0bfad7312c25e414fc3d0e3640a77bd4b5c74d2118595670999afef9758cb49b done
#4 extracting sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c
#4 extracting sha256:56db04c463e993ac037103947cd590d52fcddcb17ad04285a0ca4c3510c0738c 1.7s done
#4 extracting sha256:477c7ebfb8500396b86c69952acb17b909a0a63da41e03dd4046e2c809722c6e
#4 extracting sha256:477c7ebfb8500396b86c69952acb17b909a0a63da41e03dd4046e2c809722c6e 0.1s done
#4 extracting sha256:8bb4aa3e51be63d4a2e5bd30ab9cd478a916ed3c5c0212a44b96fd743e0e0f2f done
#4 DONE 3.9s
#5 exporting to image
#5 exporting layers done
#5 writing image sha256:a9a9b9d2c05785835871879e4c462f64996e3cd9472cab8be018794d653c8dca done
#5 naming to docker.io/library/example_js:test done
#5 DONE 0.0s
====================================================================
+/tmp/viash_test_example_js_11714609301584302876/test_test/test_executable
>>> Create input test file
>>> Run executable
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_python_15528566541419224211'
====================================================================
+/tmp/viash_test_example_python_15528566541419224211/build_engine_environment/example_python ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_python:test' with Dockerfile
[info] docker build -t 'example_python:test' '/tmp/viash_test_example_python_15528566541419224211/build_engine_environment' -f '/tmp/viash_test_example_python_15528566541419224211/build_engine_environment/tmp/dockerbuild-example_python-sxMBfO/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 286B done
#1 DONE 0.0s
#2 [auth] library/python:pull token for registry-1.docker.io
#2 DONE 0.0s
#3 [internal] load metadata for docker.io/library/python:3.10-slim
#3 DONE 1.0s
#4 [internal] load .dockerignore
#4 transferring context: 2B done
#4 DONE 0.0s
#5 [1/1] FROM docker.io/library/python:3.10-slim@sha256:96dbae407e61d6fafdaafc76a71a9f8e148c9c0598accc7957b9abd0411b8169
#5 resolve docker.io/library/python:3.10-slim@sha256:96dbae407e61d6fafdaafc76a71a9f8e148c9c0598accc7957b9abd0411b8169 done
#5 sha256:96dbae407e61d6fafdaafc76a71a9f8e148c9c0598accc7957b9abd0411b8169 10.37kB / 10.37kB done
#5 sha256:a773107406cd3dc167cca6f91c82c2c5587ac6e84e240baa6dfc8599cd849d5e 1.75kB / 1.75kB done
#5 sha256:2d6d842c49a46952b29c57c0749b36c95504d22f30e52ce1bc3b1873084f0175 5.38kB / 5.38kB done
#5 sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 0B / 29.78MB 0.1s
#5 sha256:c72c567266265eaf3c81cecf291e32dc35cb03f44a34cc37c4bb2c3f1ca6741c 0B / 4.25MB 0.1s
#5 sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 0B / 13.82MB 0.1s
#5 sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 4.19MB / 29.78MB 0.2s
#5 sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 14.68MB / 29.78MB 0.4s
#5 sha256:c72c567266265eaf3c81cecf291e32dc35cb03f44a34cc37c4bb2c3f1ca6741c 4.25MB / 4.25MB 0.3s done
#5 sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 4.19MB / 13.82MB 0.4s
#5 sha256:50942d41387aef5ae8d0f6edc09bd9cd73a38f6524751d5f2f57998ddd11a0a8 249B / 249B 0.4s done
#5 sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 28.31MB / 29.78MB 0.6s
#5 sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 8.39MB / 13.82MB 0.6s
#5 sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 29.78MB / 29.78MB 0.6s done
#5 sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 12.58MB / 13.82MB 0.7s
#5 extracting sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 0.1s
#5 sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 13.82MB / 13.82MB 0.8s done
#5 extracting sha256:8c7716127147648c1751940b9709b6325f2256290d3201662eca2701cadb2cdf 0.9s done
#5 extracting sha256:c72c567266265eaf3c81cecf291e32dc35cb03f44a34cc37c4bb2c3f1ca6741c 0.1s
#5 extracting sha256:c72c567266265eaf3c81cecf291e32dc35cb03f44a34cc37c4bb2c3f1ca6741c 0.1s done
#5 extracting sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57
#5 extracting sha256:d388ad611dd588e3ed77ab1b3b5a2b97fbf2b962822c734d646642d8afa43d57 0.6s done
#5 extracting sha256:50942d41387aef5ae8d0f6edc09bd9cd73a38f6524751d5f2f57998ddd11a0a8 done
#5 DONE 2.5s
#6 exporting to image
#6 exporting layers done
#6 writing image sha256:9f65fb2e1eea6b6577c7284a21833c72c0368f57f3636afaff6274511cc64eb7 done
#6 naming to docker.io/library/example_python:test done
#6 DONE 0.0s
====================================================================
+/tmp/viash_test_example_python_15528566541419224211/test_test/test_executable
Copying 'foo.txt' to 'bar.txt'.
>>> Create input test file
>>> Run executable
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_r_1840366782606354070'
====================================================================
+/tmp/viash_test_example_r_1840366782606354070/build_engine_environment/example_r ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_r:test' with Dockerfile
[info] docker build -t 'example_r:test' '/tmp/viash_test_example_r_1840366782606354070/build_engine_environment' -f '/tmp/viash_test_example_r_1840366782606354070/build_engine_environment/tmp/dockerbuild-example_r-24ktB4/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 287B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/eddelbuettel/r2u:22.04
#2 DONE 0.5s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/1] FROM docker.io/eddelbuettel/r2u:22.04@sha256:e71d4bd06713b2048f3725a5a06e987ca709fa1b33e730cda653e3f8db49a0d1
#4 resolve docker.io/eddelbuettel/r2u:22.04@sha256:e71d4bd06713b2048f3725a5a06e987ca709fa1b33e730cda653e3f8db49a0d1 done
#4 sha256:e71d4bd06713b2048f3725a5a06e987ca709fa1b33e730cda653e3f8db49a0d1 954B / 954B done
#4 sha256:3330f05f29b99d58110fa89411ef71a68de97574d65d829f392131e6892c9f10 5.87kB / 5.87kB done
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 0B / 30.43MB 0.1s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 0B / 72.25MB 0.1s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 0B / 235.01MB 0.1s
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 7.34MB / 30.43MB 0.3s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 4.19MB / 72.25MB 0.3s
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 15.73MB / 30.43MB 0.5s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 14.68MB / 72.25MB 0.5s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 20.97MB / 235.01MB 0.5s
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 24.12MB / 30.43MB 0.7s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 27.26MB / 72.25MB 0.7s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 35.65MB / 235.01MB 0.7s
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 26.21MB / 30.43MB 0.8s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 33.55MB / 72.25MB 0.8s
#4 sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 30.43MB / 30.43MB 0.9s done
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 37.75MB / 72.25MB 0.9s
#4 extracting sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 48.23MB / 235.01MB 1.0s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 42.99MB / 72.25MB 1.1s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 60.82MB / 235.01MB 1.2s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 51.38MB / 72.25MB 1.3s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 59.77MB / 72.25MB 1.5s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 94.37MB / 235.01MB 1.5s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 69.21MB / 72.25MB 1.6s
#4 sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 72.25MB / 72.25MB 1.7s done
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 111.15MB / 235.01MB 1.8s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 124.78MB / 235.01MB 2.0s
#4 extracting sha256:e96e057aae67380a4ddb16c337c5c3669d97fdff69ec537f02aa2cc30d814281 1.0s done
#4 extracting sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 0.1s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 141.56MB / 235.01MB 2.3s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 163.58MB / 235.01MB 2.6s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 179.31MB / 235.01MB 2.9s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 195.04MB / 235.01MB 3.2s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 207.62MB / 235.01MB 3.4s
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 235.01MB / 235.01MB 3.8s
#4 extracting sha256:af18caf2c1a90d5f23609a5d79925507c9adcd58c4e867391d943a7157e01a54 1.6s done
#4 sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 235.01MB / 235.01MB 4.0s done
#4 extracting sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6
#4 extracting sha256:aa48af1f9f911d7fdf489e254463aa5b8041f3ded7add5f65c86127c0d4acab6 5.0s done
#4 DONE 10.9s
#5 exporting to image
#5 exporting layers done
#5 writing image sha256:b5b2b50f601bbf7410c939454f0797efb044f54ae05e3889f077891138e6fee9 done
#5 naming to docker.io/library/example_r:test done
#5 DONE 0.1s
====================================================================
+/tmp/viash_test_example_r_1840366782606354070/test_test/test_executable
>>> Create input test file
>>> Run executable
Copying 'foo.txt' to 'bar.txt'.
[1] TRUE
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
viash test config.vsh.yaml
Running tests in temporary directory: '/tmp/viash_test_example_scala_3900618590139237185'
====================================================================
+/tmp/viash_test_example_scala_3900618590139237185/build_engine_environment/example_scala ---verbosity 6 ---setup cachedbuild ---engine docker
[notice] Building container 'example_scala:test' with Dockerfile
[info] docker build -t 'example_scala:test' '/tmp/viash_test_example_scala_3900618590139237185/build_engine_environment' -f '/tmp/viash_test_example_scala_3900618590139237185/build_engine_environment/tmp/dockerbuild-example_scala-1sYY6j/Dockerfile'
#0 building with "default" instance using docker driver
#1 [internal] load build definition from Dockerfile
#1 transferring dockerfile: 323B done
#1 DONE 0.0s
#2 [internal] load metadata for docker.io/sbtscala/scala-sbt:eclipse-temurin-19_36_1.7.2_2.13.10
#2 DONE 0.6s
#3 [internal] load .dockerignore
#3 transferring context: 2B done
#3 DONE 0.0s
#4 [1/1] FROM docker.io/sbtscala/scala-sbt:eclipse-temurin-19_36_1.7.2_2.13.10@sha256:440234e283754375d5ab6bcb35e2d470f9dabeaaeb639d8c0708fac2d3707e0c
#4 resolve docker.io/sbtscala/scala-sbt:eclipse-temurin-19_36_1.7.2_2.13.10@sha256:440234e283754375d5ab6bcb35e2d470f9dabeaaeb639d8c0708fac2d3707e0c done
#4 sha256:440234e283754375d5ab6bcb35e2d470f9dabeaaeb639d8c0708fac2d3707e0c 743B / 743B done
#4 sha256:76808e2ea8df2d9cac1d275426e51a2190369f706076c55ac2da3823bef0a019 10.89kB / 10.89kB done
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 0B / 30.43MB 0.1s
#4 sha256:06478611ba16efc6663ccf5f22a29c990c53aed6848bc58c54c67dc32d8aef13 3.04kB / 3.04kB done
#4 sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 0B / 16.99MB 0.1s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 0B / 200.85MB 0.1s
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 7.34MB / 30.43MB 0.3s
#4 sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 3.15MB / 16.99MB 0.3s
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 16.78MB / 30.43MB 0.5s
#4 sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 9.44MB / 16.99MB 0.5s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 12.58MB / 200.85MB 0.5s
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 27.26MB / 30.43MB 0.7s
#4 sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 14.68MB / 16.99MB 0.7s
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 29.36MB / 30.43MB 0.8s
#4 sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 16.99MB / 16.99MB 0.7s done
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 32.51MB / 200.85MB 0.8s
#4 sha256:2af8e2a543d81b57575a2e457bd1e98ffc061b15639dac3be5ff6c2702b9ea1a 0B / 175B 0.8s
#4 extracting sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987
#4 sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 30.43MB / 30.43MB 0.8s done
#4 sha256:2af8e2a543d81b57575a2e457bd1e98ffc061b15639dac3be5ff6c2702b9ea1a 175B / 175B 0.9s done
#4 sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 0B / 23.71MB 0.9s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 0B / 29.75MB 0.9s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 52.43MB / 200.85MB 1.0s
#4 sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 4.19MB / 23.71MB 1.0s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 2.10MB / 29.75MB 1.0s
#4 sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 10.49MB / 23.71MB 1.1s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 6.29MB / 29.75MB 1.1s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 67.11MB / 200.85MB 1.2s
#4 sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 15.73MB / 23.71MB 1.2s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 11.53MB / 29.75MB 1.2s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 82.84MB / 200.85MB 1.4s
#4 sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 23.71MB / 23.71MB 1.3s done
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 18.87MB / 29.75MB 1.4s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 0B / 40.48MB 1.4s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 93.32MB / 200.85MB 1.5s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 20.97MB / 29.75MB 1.5s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 4.19MB / 40.48MB 1.5s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 23.07MB / 29.75MB 1.6s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 10.49MB / 40.48MB 1.6s
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 27.26MB / 29.75MB 1.7s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 19.92MB / 40.48MB 1.7s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 117.44MB / 200.85MB 1.9s
#4 extracting sha256:301a8b74f71f85f3a31e9c7e7fedd5b001ead5bcf895bc2911c1d260e06bd987 1.0s done
#4 sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 29.75MB / 29.75MB 1.7s done
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 33.55MB / 40.48MB 1.9s
#4 sha256:c9480a4b593fb5abc117a5e01c80d8495c9fd89e743757730c712545f425c9f3 183B / 183B 1.8s done
#4 sha256:812216efaf878f5ff8086b6efdccec1cb090228107efd62db47d048c927c4f6a 0B / 4.33kB 1.9s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 39.85MB / 40.48MB 2.0s
#4 sha256:812216efaf878f5ff8086b6efdccec1cb090228107efd62db47d048c927c4f6a 4.33kB / 4.33kB 1.9s done
#4 extracting sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a
#4 sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 0B / 32B 2.0s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 132.12MB / 200.85MB 2.1s
#4 sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 40.48MB / 40.48MB 2.0s done
#4 sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B 2.1s done
#4 sha256:2c0021742fe2b9491f62c3d89da10492c175081bd17d77efd0f22a298c37ad64 0B / 222B 2.1s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 0B / 214.15MB 2.1s
#4 sha256:2c0021742fe2b9491f62c3d89da10492c175081bd17d77efd0f22a298c37ad64 222B / 222B 2.1s done
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 144.70MB / 200.85MB 2.3s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 167.77MB / 200.85MB 2.5s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 19.92MB / 214.15MB 2.5s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 190.01MB / 200.85MB 2.7s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 37.75MB / 214.15MB 2.7s
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 200.85MB / 200.85MB 3.0s
#4 extracting sha256:c5c735a83dbd58e1c83f8d52abdc51068e27c00405f53d59802d4954a6b5398a 0.9s done
#4 sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 200.85MB / 200.85MB 3.1s done
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 57.67MB / 214.15MB 3.2s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 69.21MB / 214.15MB 3.4s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 82.84MB / 214.15MB 3.6s
#4 extracting sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 0.1s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 94.37MB / 214.15MB 3.9s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 121.63MB / 214.15MB 4.3s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 142.61MB / 214.15MB 4.5s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 160.43MB / 214.15MB 4.8s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 180.36MB / 214.15MB 5.0s
#4 extracting sha256:5fb9fa7513e6a72bf7daf0a75e97c441f1ed7ff69c8609d1c429fdf3a6dc846b 1.5s done
#4 extracting sha256:2af8e2a543d81b57575a2e457bd1e98ffc061b15639dac3be5ff6c2702b9ea1a
#4 extracting sha256:2af8e2a543d81b57575a2e457bd1e98ffc061b15639dac3be5ff6c2702b9ea1a done
#4 extracting sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 193.99MB / 214.15MB 6.1s
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 210.76MB / 214.15MB 6.3s
#4 extracting sha256:14d68137d870fdc4bc849fbe5c5571ca3e6d9a7b2c5bf1c7e928ccf716dd3b4a 0.4s done
#4 extracting sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a
#4 sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 214.15MB / 214.15MB 6.4s done
#4 extracting sha256:320659737461e071e3d809231861a7487daaa79805c57f97015ff020f34a939a 0.1s done
#4 extracting sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 0.1s
#4 extracting sha256:1dea7716181a505cea41832dc84691b858a8f64471cb352d8c29cec06e428aeb 1.1s done
#4 extracting sha256:c9480a4b593fb5abc117a5e01c80d8495c9fd89e743757730c712545f425c9f3 done
#4 extracting sha256:812216efaf878f5ff8086b6efdccec1cb090228107efd62db47d048c927c4f6a
#4 extracting sha256:812216efaf878f5ff8086b6efdccec1cb090228107efd62db47d048c927c4f6a done
#4 extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 done
#4 extracting sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 0.1s
#4 extracting sha256:bb7a0c6ab9c129a399a3c8f034cd0de30406766d61a6694f150b4ab9e64c560c 1.2s done
#4 extracting sha256:2c0021742fe2b9491f62c3d89da10492c175081bd17d77efd0f22a298c37ad64
#4 extracting sha256:2c0021742fe2b9491f62c3d89da10492c175081bd17d77efd0f22a298c37ad64 done
#4 DONE 9.3s
#5 exporting to image
#5 exporting layers done
#5 writing image sha256:5958465c8954d31cf3a0db1db4ab7f679973327cffadde8370e178a54e6aa7c4 done
#5 naming to docker.io/library/example_scala:test done
#5 DONE 0.1s
====================================================================
+/tmp/viash_test_example_scala_3900618590139237185/test_test/test_executable
warning: 1 deprecation
warning: 1 deprecation (since 2.13.3)
warning: 2 deprecations in total; re-run with -deprecation for details
>>> Create input test file
>>> Run executable
warning: 1 deprecation; re-run with -deprecation for details
Copying 'foo.txt' to 'bar.txt'.
>>> Check whether output file exists
>>> Check whether input and output file are the same
>>> Test finished successfully
====================================================================
SUCCESS! All 1 out of 1 test scripts succeeded!
Cleaning up temporary directory
When running viash test
, Viash will follow the following steps:
Create a temporary directory
Build the component into the main executable
(Re-)build the Docker image for the component
Iterate over all unit test scripts:
Build the unit test into an executable
Run the unit test, passing the main executable as an argument
Return exit code 0 if all of the above steps succeed, otherwise 0
Bonus: unit testing all of the components
If you have multiple Viash components located in a directory called src/
, what happens when you run the following?
viash ns test --parallel --src src/