Skip to content

Commit

Permalink
fix(ci): Avoid dates in integration tests
Browse files Browse the repository at this point in the history
Turns out that ls skips the time if the timestamp is far enough in the past.
  • Loading branch information
VorpalBlade committed Oct 12, 2024
1 parent 8b57e99 commit 45a8ad8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
3 changes: 1 addition & 2 deletions integration_tests/arch/basic_config/expected/1_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ checking keyring...
checking package integrity...
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n")
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n# HI!\n")
-rw-r--r-- 1 root root 1 Apr 7 18:02 arch-release
-rw-r--r-- 1 root root 411 Sep 6 23:15 os-release
Hello world
"output:"
Ok("")
"bor\nbar\nbar\nquux hi there\n"
Expand Down
3 changes: 1 addition & 2 deletions integration_tests/arch/basic_config/expected/2_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ INFO script{phase=Main}: konfigkoll_script::engine: Calling script
Some(123)
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n")
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n# HI!\n")
-rw-r--r-- 1 root root 1 Apr 7 18:02 arch-release
-rw-r--r-- 1 root root 411 Sep 6 23:15 os-release
Hello world
"output:"
Ok("")
"bor\nbar\nbar\nquux hi there\n"
Expand Down
3 changes: 1 addition & 2 deletions integration_tests/arch/basic_config/expected/3_output.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ INFO script{phase=Main}: konfigkoll_script::engine: Calling script
Some(123)
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n")
Ok("# Dynamic linker/loader configuration.\n# See ld.so(8) and ldconfig(8) for details.\n\ninclude /etc/ld.so.conf.d/*.conf\ninclude /usr/lib/ld.so.conf.d/*.conf\n# HI!\n")
-rw-r--r-- 1 root root 1 Apr 7 18:02 arch-release
-rw-r--r-- 1 root root 411 Sep 6 23:15 os-release
Hello world
"output:"
Ok("")
"bor\nbar\nbar\nquux hi there\n"
Expand Down
7 changes: 3 additions & 4 deletions integration_tests/arch/basic_config/main.rn
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,12 @@ pub async fn phase_main(props, cmds, package_managers) {
dbg(passwd.read_all_string());

// Test command execution
let cmd = process::Command::new("ls");
cmd.arg("-l");
cmd.arg("/etc");
let cmd = process::Command::new("/usr/bin/echo");
cmd.arg("Hello world\nHi there\n");
cmd.stdout(process::Stdio::piped());
let child = cmd.spawn()?;
let cmd2 = process::Command::new("grep");
cmd2.arg("release");
cmd2.arg("world");
cmd2.stdin(child.stdout().unwrap().try_into_stdio()?);
let child2 = cmd2.spawn()?;
let output = child2.wait_with_output().await?;
Expand Down

0 comments on commit 45a8ad8

Please sign in to comment.