Remove worthless iptables test

Docker-DCO-1.1-Signed-off-by: Michael Crosby <michael@crosbymichael.com> (github: crosbymichael)
Upstream-commit: 58e011595e4c518a38ec27716585177faa969f72
Component: engine
This commit is contained in:
Michael Crosby
2014-04-18 03:22:53 +00:00
parent 42d84ccd4c
commit 4078a75e3a

View File

@ -1,22 +0,0 @@
package docker
import (
"github.com/dotcloud/docker/pkg/iptables"
"os"
"testing"
)
// FIXME: this test should be a unit test.
// For example by mocking os/exec to make sure iptables is not actually called.
func TestIptables(t *testing.T) {
if _, err := iptables.Raw("-L"); err != nil {
t.Fatal(err)
}
path := os.Getenv("PATH")
os.Setenv("PATH", "")
defer os.Setenv("PATH", path)
if _, err := iptables.Raw("-L"); err == nil {
t.Fatal("Not finding iptables in the PATH should cause an error")
}
}