github.com/google/yamlfmt@v0.12.2-0.20240514121411-7f77800e2681/integrationtest/command/README.md (about) 1 # Command Integration Tests 2 3 These are tests that run a yamlfmt binary with different combos of commands in a temp directory set up by the test data. 4 5 Each test runs by: 6 * Accepting the absolute path to a binary in the `YAMLFMT_BIN` environment variable 7 * Creating a temporary directory 8 * Copying everything from `before` in the testdata folder for the given test into the temp directory 9 * Run the specified command for the given test with the temp directory as the working directory 10 * Compare goldens for command output and state of the directory 11 - If running with a `-update` flag, simply overwrite all golden files 12 - If running normally, compare the golden files to ensure all the files are the same and the content of each file matches 13 14 You can run the tests by running `make integrationtest` which will build the binary and run the tests with it.