Permalink
Browse files

Test that nc is available before running tests

  • Loading branch information...
Dmitriy Kalinin and Pieter Noordhuis
Dmitriy Kalinin and Pieter Noordhuis committed Mar 18, 2013
1 parent d0e5839 commit 22eeebb3542d02a67890c6957fec05a003e68612
Showing with 9 additions and 0 deletions.
  1. +9 −0 warden/spec/container/linux_spec.rb
@@ -446,6 +446,15 @@ def net_in(options = {})
response
end
+ before(:all) do
+ ["/", container_rootfs_path].each do |root|
+ paths = %w(/bin /usr/bin).map { |e| File.join(root, e) }
+ if !paths.any? { |e| File.exist?(File.join(e, "nc")) }
+ raise "Expected `nc` to be present in [#{paths.join(", ")}]"
+ end
+ end
+ end
+
before do
@handle = client.create.handle
end

0 comments on commit 22eeebb

Please sign in to comment.