Skip to content

Conversation

@jesseduffield
Copy link
Owner

@jesseduffield jesseduffield commented Apr 14, 2023

Upon running go generate pkg/integration/tests/tests.go locally I get:

panic: expected test BasicAtRuntime to be defined in file basic_at_runtime.go. Perhaps you misspelt it? The name of the test should be the name of the file but converted from snake_case to PascalCase

goroutine 1 [running]:
main.appendDirTests({0x112f248, 0xc00009b5f0}, 0x110cb2c?)
	/Users/jesseduffieldduffield/repos/lazygit/pkg/integration/tests/test_list_generator.go:93 +0x4d4
main.generateCode()
	/Users/jesseduffieldduffield/repos/lazygit/pkg/integration/tests/test_list_generator.go:58 +0x205
main.main()
	/Users/jesseduffieldduffield/repos/lazygit/pkg/integration/tests/test_list_generator.go:23 +0x19
exit status 2
pkg/integration/tests/tests.go:1: running "go": exit status 1
Unexpected change to tests list. Run 'go generate pkg/integration/tests/tests.go' locally and commit the changes

To fix this I'm adding a step in CI to ensure the test list has been produced by the generator

  • PR Description

  • Please check if the PR fulfills these requirements

  • Cheatsheets are up-to-date (run go run scripts/cheatsheet/main.go generate)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • Docs (specifically docs/Config.md) have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@github-actions
Copy link
Contributor

github-actions bot commented Apr 14, 2023

Uffizzi Preview deployment-22252 was deleted.

@jesseduffield jesseduffield changed the title ensure test list is correct in CI Ensure test list is correct in CI Apr 14, 2023
@stefanhaller
Copy link
Collaborator

Ah, I did something similar in #2545. 😄

@jesseduffield
Copy link
Owner Author

great minds think alike. I've merged yours :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants