github.com/verrazzano/verrazzano@v1.7.0/tools/eventually-checker/README.md (about)

     1  # Eventually Checker
     2  
     3  This tool is used to scan tests that use the gomega and ginkgo packages and checks for calls that will force `gomega.Eventually` calls to exit prematurely. Specifically, it looks for `ginkgo.Fail` and `gomega.Expect` calls in call trees rooted by `gomega.Eventually`.
     4  
     5  ## Usage
     6  
     7  ```shell
     8  go run check_eventually.go [options] path
     9  
    10  Options:
    11    -report   report on problems but always exits with a zero status code
    12  ```
    13  
    14  ## Running the Checker
    15  
    16  The tool is integrated into the Verrazzano top-level Makefile in the `check-tests` target. Use `make check-tests` or run the tool manually. For example, to run the tool against the acceptance tests:
    17  
    18  ```shell
    19  $ go run tools/eventually-checker/check_eventually.go tests/e2e
    20  ```
    21  If the tool finds suspect calls, it displays the locations of those calls along with the locations of the `Eventually` calls. For example:
    22  
    23  ```shell
    24  $ go run tools/eventually-checker/check_eventually.go tools/eventually-checker/test/
    25  
    26  eventuallyChecker: Fail/Expect at /go/src/github.com/verrazzano/verrazzano/tools/eventually-checker/test/internal/helper.go:12:2
    27      called from Eventually at:
    28          /go/src/github.com/verrazzano/verrazzano/tools/eventually-checker/test/main.go:14:3
    29  
    30  eventuallyChecker: Fail/Expect at /go/src/github.com/verrazzano/verrazzano/tools/eventually-checker/test/main.go:32:2
    31      called from Eventually at:
    32          /go/src/github.com/verrazzano/verrazzano/tools/eventually-checker/test/main.go:23:3
    33  ```