github.com/verrazzano/verrazzano@v1.7.0/tools/eventually-checker/testdata/internal/helper.go (about) 1 // Copyright (c) 2021, 2022, Oracle and/or its affiliates. 2 // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. 3 package internal 4 5 import "github.com/onsi/gomega" 6 7 func DoSomething() (bool, error) { 8 return someNestedFunc(), nil 9 } 10 11 func someNestedFunc() bool { 12 gomega.Expect(false).To(gomega.BeTrue()) 13 return true 14 } 15 16 func AnotherFunc() bool { 17 return false 18 } 19 20 func DoCallExpect() bool { 21 return gomega.Expect(true).To(gomega.BeTrue()) 22 } 23 24 func DoCallEventually() (bool, error) { 25 gomega.Eventually(func() (bool, error) { 26 gomega.Expect(true).To(gomega.BeTrue()) 27 return true, nil 28 }) 29 return true, nil 30 }