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

implement testsuite and test-containers for repository integration test #332

Merged
merged 3 commits into from
Nov 15, 2024

Conversation

sudiptob2
Copy link
Collaborator

closes #82

@sudiptob2 sudiptob2 self-assigned this Nov 12, 2024

func (ns *NodeTestSuite) SetupSuite() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we want to run many test suites? Isn't it better to have a single db instance and maybe, if we really need to do it, create different databases?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks. I thought creating multiple db containers would help to run the tests in parallel. But the idea of creating multiple db in a single container sounds good.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Creating db instances in Postgres is very fast, definitely quicker than instantiating a container.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated with separate DB instead of separate container

@sudiptob2 sudiptob2 force-pushed the feat/82/setup-testsuit branch from 21a0821 to 9e175d5 Compare November 14, 2024 15:33
Copy link
Collaborator

@richscott richscott left a comment

Choose a reason for hiding this comment

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

It looks good - I just had one type suggestion.

Password string
DBName string
Host string
Port string
Copy link
Collaborator

Choose a reason for hiding this comment

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

What do you think about making this an int instead of a string, for a little more type-safety?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated

@sudiptob2 sudiptob2 requested a review from richscott November 15, 2024 04:40
richscott
richscott previously approved these changes Nov 15, 2024
@sudiptob2 sudiptob2 merged commit 4349ceb into G-Research:main Nov 15, 2024
9 checks passed
@sudiptob2 sudiptob2 deleted the feat/82/setup-testsuit branch November 18, 2024 14:58
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.

Add setup/teardown logic for running multiple integration tests in same test instance
3 participants