Browse Source

Remove race condition caused by double-destroy in 2 tests

Solomon Hykes 11 years ago
parent
commit
330062ef72
2 changed files with 0 additions and 7 deletions
  1. 0 1
      container_test.go
  2. 0 6
      runtime_test.go

+ 0 - 1
container_test.go

@@ -1072,7 +1072,6 @@ func TestLXCConfig(t *testing.T) {
 	if err != nil {
 		t.Fatal(err)
 	}
-	defer runtime.Destroy(container)
 	container.generateLXCConfig(nil)
 	grepFile(t, container.lxcConfigPath(), "lxc.utsname = foobar")
 	grepFile(t, container.lxcConfigPath(),

+ 0 - 6
runtime_test.go

@@ -276,12 +276,6 @@ func TestRuntimeCreate(t *testing.T) {
 		t.Fatal(err)
 	}
 
-	defer func() {
-		if err := runtime.Destroy(container); err != nil {
-			t.Error(err)
-		}
-	}()
-
 	// Make sure we can find the newly created container with List()
 	if len(runtime.List()) != 1 {
 		t.Errorf("Expected 1 container, %v found", len(runtime.List()))