[shellprocess] Expand example and repair test

- Adding another example command broke the test which checks
  the number of entries in the example script.
- Add a second line of output to the example command, so it makes
  more sense to log it line-by-line.
This commit is contained in:
Adriaan de Groot 2024-07-03 23:05:30 +02:00
parent e08bd744a8
commit 80ef430185
2 changed files with 2 additions and 2 deletions

View File

@ -49,7 +49,7 @@ ShellProcessTests::testProcessListSampleConfig()
CommandList cl( Calamares::YAML::mapToVariant( doc ).value( "script" ) ); CommandList cl( Calamares::YAML::mapToVariant( doc ).value( "script" ) );
QVERIFY( !cl.isEmpty() ); QVERIFY( !cl.isEmpty() );
QCOMPARE( cl.count(), 3 ); QCOMPARE( cl.count(), 4 );
QCOMPARE( cl.at( 0 ).timeout(), Calamares::CommandLine::TimeoutNotSet() ); QCOMPARE( cl.at( 0 ).timeout(), Calamares::CommandLine::TimeoutNotSet() );
QCOMPARE( cl.at( 2 ).timeout(), 3600s ); // slowloris QCOMPARE( cl.at( 2 ).timeout(), 3600s ); // slowloris

View File

@ -130,7 +130,7 @@ script:
- "/usr/bin/true" - "/usr/bin/true"
- command: "/usr/local/bin/slowloris" - command: "/usr/local/bin/slowloris"
timeout: 3600 timeout: 3600
- command: "echo -e '\e[33;2mred\e[33;0m'" - command: "echo -e '\e[33;2mred\e[33;0m' ; echo second line"
verbose: true verbose: true
# You can change the description of the job (as it is displayed in the # You can change the description of the job (as it is displayed in the