Browse Source

tests: add mutex lock when necessary

Jonathan Boulle 9 years ago
parent
commit
41c24d1684
1 changed files with 4 additions and 0 deletions
  1. 4 0
      iptables/iptables_test.go

+ 4 - 0
iptables/iptables_test.go

@@ -45,6 +45,10 @@ func mustTestableIptables() []*IPTables {
 			path:    ipt.path,
 			hasWait: false,
 		}
+		iptNoWait.fmu, err = newXtablesFileLock()
+		if err != nil {
+			panic(fmt.Sprintf("NewXtablesFileLock failed: %v", err))
+		}
 		ipts = append(ipts, iptNoWait)
 	}
 	// ensure we check one variant without built-in checking