...

Text file src/k8s.io/kubernetes/test/fixtures/README.md

Documentation: k8s.io/kubernetes/test/fixtures

     1# test/fixtures
     2
     3## Embedded Test Data
     4
     5In 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
     7For 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
    17This fixture can be accessed in the e2e tests using `test/e2e/framework/testfiles.Read` like
    18`testfiles.Read("test/fixtures/README.md)`.
    19
    20This is needed since [migrating to //go:embed from go-bindata][1].
    21
    22[1]: https://github.com/kubernetes/kubernetes/pull/99829

View as plain text