Skip to content

Commit

Permalink
On slow CI server command might take > 1s
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbrictson committed Jul 13, 2015
1 parent 40a3237 commit 2d354d4
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test/airbrussh/formatter_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_formats_execute_with_color
assert_output_lines(
" 01 \e[0;33;49mecho foo\e[0m\n",
" 01 foo\n",
/ \e\[0;32;49m✔ 01 #{@user}@localhost\e\[0m \e\[0;90;49m0.\d+s\e\[0m\n/
/ \e\[0;32;49m✔ 01 #{@user}@localhost\e\[0m \e\[0;90;49m\d.\d+s\e\[0m\n/
)

assert_log_file_lines(
Expand All @@ -78,7 +78,7 @@ def test_formats_execute_without_color
assert_output_lines(
" 01 echo foo\n",
" 01 foo\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/
/ ✔ 01 #{@user}@localhost \d.\d+s\n/
)

assert_log_file_lines(
Expand All @@ -97,7 +97,7 @@ def test_formats_without_command_output

assert_output_lines(
" 01 ls -l\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/
/ ✔ 01 #{@user}@localhost \d.\d+s\n/
)
end

Expand All @@ -124,7 +124,7 @@ def test_formats_failing_execute_with_color
expected_output = [
" 01 \e[0;33;49mecho hi\e[0m\n",
" 01 hi\n",
/ \e\[0;32;49m✔ 01 test_user@localhost\e\[0m \e\[0;90;49m0.\d+s\e\[0m\n/,
/ \e\[0;32;49m✔ 01 test_user@localhost\e\[0m \e\[0;90;49m\d.\d+s\e\[0m\n/,
" 02 \e[0;33;49mls _file_does_not_exist\e[0m\n"
]

Expand Down Expand Up @@ -166,7 +166,7 @@ def test_formats_capture_with_color
assert_output_lines(
" 01 \e[0;33;49mls -1 airbrussh.gemspec\e[0m\n",
" 01 airbrussh.gemspec\n",
/ \e\[0;32;49m✔ 01 #{@user}@localhost\e\[0m \e\[0;90;49m0.\d+s\e\[0m\n/
/ \e\[0;32;49m✔ 01 #{@user}@localhost\e\[0m \e\[0;90;49m\d.\d+s\e\[0m\n/
)

assert_log_file_lines(
Expand All @@ -186,7 +186,7 @@ def test_formats_capture_without_color
assert_output_lines(
" 01 ls -1 airbrussh.gemspec\n",
" 01 airbrussh.gemspec\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/
/ ✔ 01 #{@user}@localhost \d.\d+s\n/
)

assert_log_file_lines(
Expand Down Expand Up @@ -238,20 +238,20 @@ def test_handles_rake_tasks
"00:00 special_rake_task\n",
" 01 echo command 1\n",
" 01 command 1\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/,
/ ✔ 01 #{@user}@localhost \d.\d+s\n/,
" Starting command 2\n",
" 02 echo command 2\n",
" 02 command 2\n",
/ ✔ 02 #{@user}@localhost 0.\d+s\n/,
/ ✔ 02 #{@user}@localhost \d.\d+s\n/,
"00:00 special_rake_task_2\n",
" New task starting\n",
"00:00 special_rake_task_3\n",
" 01 echo command 3\n",
" 01 command 3\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/,
/ ✔ 01 #{@user}@localhost \d.\d+s\n/,
" 02 echo command 4\n",
" 02 command 4\n",
/ ✔ 02 #{@user}@localhost 0.\d+s\n/,
/ ✔ 02 #{@user}@localhost \d.\d+s\n/,
" All done\n"
)

Expand Down Expand Up @@ -317,14 +317,14 @@ def test_interleaved_debug_and_info_commands
"00:00 interleaving_test\n",
" 01 echo command 1\n",
" 01 command 1\n",
/ ✔ 01 #{@user}@localhost 0.\d+s\n/,
/ ✔ 01 #{@user}@localhost \d.\d+s\n/,
" Info line should be output\n",
" 02 echo command 2\n",
" 02 command 2\n",
/ ✔ 02 #{@user}@localhost 0.\d+s\n/,
/ ✔ 02 #{@user}@localhost \d.\d+s\n/,
" 03 echo command 4\n",
" 03 command 4\n",
/ ✔ 03 #{@user}@localhost 0.\d+s\n/
/ ✔ 03 #{@user}@localhost \d.\d+s\n/
)
end

Expand Down

0 comments on commit 2d354d4

Please sign in to comment.