k8s.io/kubernetes@v1.29.3/test/e2e/testing-manifests/README.md (about)

     1  # test/e2e/testing-manifests
     2  
     3  ## Embedded Test Data
     4  
     5  In case one needs to use any test fixture inside your tests and those are defined inside this directory, they need to be added to the `//go:embed` directive in `embed.go`.
     6  
     7  For example, if one wants to include this Readme as a test fixture (potential bad idea in reality!),
     8  
     9  ```
    10  // embed.go
    11  
    12  ...
    13  //go:embed some other files README.md
    14  ...
    15  ```
    16  
    17  This fixture can be accessed in the e2e tests using `test/e2e/framework/testfiles.Read` like
    18  `testfiles.Read("test/e2e/testing-manifests/README.md)`.
    19  
    20  This is needed since [migrating to //go:embed from go-bindata][1].
    21  
    22  [1]: https://github.com/kubernetes/kubernetes/pull/99829