github.com/k8snetworkplumbingwg/sriov-network-operator@v1.2.1-0.20240408194816-2d2e5a45d453/test/util/execute/ginkgo.go (about)

     1  package execute
     2  
     3  import "github.com/onsi/ginkgo/v2"
     4  
     5  // BeforeAll gets executed before all the entries of
     6  // the scope it's getting executed in.
     7  func BeforeAll(fn func()) {
     8  	first := true
     9  	ginkgo.BeforeEach(func() {
    10  		if first {
    11  			first = false
    12  			fn()
    13  		}
    14  	})
    15  }