Skip to content

Use test containers to facilitate running various integration tests#1931

Merged
jzabroski merged 17 commits into
fluentmigrator:mainfrom
PhenX:feature/docker
Mar 5, 2025
Merged

Use test containers to facilitate running various integration tests#1931
jzabroski merged 17 commits into
fluentmigrator:mainfrom
PhenX:feature/docker

Conversation

@PhenX

@PhenX PhenX commented Oct 27, 2024

Copy link
Copy Markdown
Collaborator

I fixed a few tests too. I couldn't make Firebird not Oracle Native tests to work, as they require installation of a specific client, which I didn't do.

When running all the tests, when activating Postgresql, Mysql, SQL Server and Oracle containers, take 70 seconds to run when the containers are not already running (but images already downloaded), and nearly 30s when the container is already running.

What do you think ?

@jzabroski

Copy link
Copy Markdown
Collaborator

I couldn't make Firebird not Oracle Native tests to work, as they require installation of a specific client, which I didn't do.

Can you be more specific? I may be able to help.

@PhenX

PhenX commented Nov 6, 2024

Copy link
Copy Markdown
Collaborator Author

@jzabroski In fact, I realized after that the Firebird client seems not to require anything to be installed, and I made a syntax mistake in its connection string (that I just fixed).
I could not make it to work though, whatever user, password or database name I try in either the connection string or the container builder: "unavailable database"

image

I never workd with Firebird, I may be missing something.

About the Oracle native client, I didn't try, but the managed client works well.

@PhenX
PhenX marked this pull request as ready for review November 16, 2024 16:53
fabien.menager added 3 commits November 16, 2024 17:55
Comment thread test/FluentMigrator.Tests/Integration/Migrations/TestMigration.cs
Comment thread test/FluentMigrator.Tests/Integration/IntegrationTestsSetup.cs
Comment thread test/FluentMigrator.Tests/Containers/FirebirdContainer.cs
Comment thread test/FluentMigrator.Tests/Integration/IntegrationTestsSetup.cs
Comment thread test/FluentMigrator.Tests/IntegrationTestOptions.cs
Comment thread test/FluentMigrator.Tests/appsettings.json
Comment thread test/FluentMigrator.Tests/FluentMigrator.Tests.csproj Outdated
@jzabroski

Copy link
Copy Markdown
Collaborator

@jzabroski In fact, I realized after that the Firebird client seems not to require anything to be installed, and I made a syntax mistake in its connection string (that I just fixed). I could not make it to work though, whatever user, password or database name I try in either the connection string or the container builder: "unavailable database"

image

I never workd with Firebird, I may be missing something.

About the Oracle native client, I didn't try, but the managed client works well.

The maintainer of Firebird is super polite. We may just be able to ask him what we're doing wrong. I believe they have a mailing list to ask questions on. It's been a while since I asked them for something.

@jzabroski

Copy link
Copy Markdown
Collaborator

@PhenX I think we reviewed everything. I think it's relatively OK to not prioritize the Firebird stuff right now. Making it a separate ticket.

@jzabroski jzabroski added the needs:ci-build CI Build Needed. Do not rename this label without updating GH Actions referencing it label Feb 24, 2025
@jzabroski jzabroski added needs:ci-build CI Build Needed. Do not rename this label without updating GH Actions referencing it and removed needs:ci-build CI Build Needed. Do not rename this label without updating GH Actions referencing it labels Feb 26, 2025
@PhenX

PhenX commented Mar 1, 2025

Copy link
Copy Markdown
Collaborator Author

After reading test containers releases I saw DB2 ! So I added it, and while adding it I realized I'm an idiot about the Firebird "issue" I talked about : current tests work on a "temporary table" file, that was my issue, so I added a check to use a test containers DB when available.

image

I also fixed tests from a previous PR I did (CanUseRawSqlInUpdateAndDelete).

Added DB2 docker support
Fixed CanUseRawSqlInUpdateAndDelete tests
Fixed Firebird integration tests with page size too small errors
Ignore Oracle native tests when no native client available
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