Skip to content

Commit

Permalink
Minor fixes on IPTables module tests
Browse files Browse the repository at this point in the history
This minor PR removes functions used to create resources during IPTables module tests.
  • Loading branch information
davidefalcone1 committed Jun 25, 2021
1 parent f8ec470 commit 4bfbff1
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 102 deletions.
16 changes: 16 additions & 0 deletions pkg/liqonet/iptables/iptables_suite_test.go
Expand Up @@ -3,6 +3,7 @@ package iptables
import (
"testing"

. "github.com/coreos/go-iptables/iptables"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
)
Expand All @@ -11,3 +12,18 @@ func TestIptables(t *testing.T) {
RegisterFailHandler(Fail)
RunSpecs(t, "Iptables Suite")
}

var _ = BeforeSuite(func() {
var err error
h, err = NewIPTHandler()
Expect(err).To(BeNil())
ipt, err = New()
Expect(err).To(BeNil())
err = h.Init()
Expect(err).To(BeNil())
})

var _ = AfterSuite(func() {
err := h.Terminate()
Expect(err).To(BeNil())
})

0 comments on commit 4bfbff1

Please sign in to comment.