Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Db/integration tests #311

Merged
merged 8 commits into from
Aug 9, 2024
Merged

Db/integration tests #311

merged 8 commits into from
Aug 9, 2024

Conversation

davidbloss
Copy link
Contributor

@davidbloss davidbloss commented Aug 8, 2024

Issues

CLI integration tests

Changelog

Add integration tests on CRUD operations in cli. Creates, Updates, Deletes actual test resources

  • List your changes here
  • Make a changie entry, N/A testing only

Tophatting

task test-integration

@davidbloss davidbloss self-assigned this Aug 8, 2024
Copy link
Contributor

@taimoorgit taimoorgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had some feedback,

  1. We should handle all errors instead of ignoring them with _. If the error is really unusual for a test and it is tedious to have the calling function handle them, can we just panic() if err != nil?

  2. Tests would be much more easy to read if each object had multiple Test_ functions rather than only Test_...CRUD which does everything.

  3. We could add a cmd_test package (I don't hold this opinion strongly)

Taskfile.yml Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
src/cmd/team_test.go Show resolved Hide resolved
src/cmd/user_test.go Show resolved Hide resolved
src/cmd/util_test.go Outdated Show resolved Hide resolved
Copy link
Contributor

@taimoorgit taimoorgit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great revision, I have another recommendation to consider before merging

src/cmd/team_test.go Outdated Show resolved Hide resolved
src/cmd/team_test.go Show resolved Hide resolved
@davidbloss davidbloss merged commit c6b7c15 into main Aug 9, 2024
4 checks passed
@davidbloss davidbloss deleted the db/integration-tests branch August 9, 2024 18:45
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.

2 participants