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

add: tests for CockroachDB #1869

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

dikshant
Copy link

@dikshant dikshant commented Dec 27, 2022

This PR adds tests for CockroachDB. The tests are largely borrowed from the existing PostgreSQL tests to ensure basic functionality. Due to the way SERIAL primary keys work in CockroachDB some tests had to be removed because they were no longer deterministic.

The official CockroachDB docker image cockroachdb/cockroach#83749 has trouble starting in single node mode in Actions CI, so an alternate image had to be used.

Finally, I was running into issues with .NET framework versions missing for 3.x and 5.x so I modified the CI to include those versions.

You can see that the tests pass on my fork here:
https://github.com/dikshant/Dapper/actions/runs/3790538626/jobs/6445231573

@dikshant
Copy link
Author

Ah it seems the CI/CD has moved to Appveyor. I don't see a way to setup CockroachDB through the AppVeyor CI, although I do see configuration for Postgres and MYSQL. Any help there would be appreciated.

@@ -23,6 +23,10 @@ jobs:
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
cockroachdb:
image: timveil/cockroachdb-single-node:latest
Copy link
Member

Choose a reason for hiding this comment

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

Let's try and use the official image here please - everything else looks good at a quick glance, but we'd want to rely on the official image in the builds.

@@ -38,8 +42,15 @@ jobs:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test
steps:

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change

with:
dotnet-version: |
3.1.x
5.0.x
Copy link
Member

Choose a reason for hiding this comment

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

Dapper needs a lot of updating love we haven't had time for - this shouldn't be needed, but needs to be paired with a net6.0 update on test projects only (not changing core library targets). We can do that in this PR or separately.

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.

None yet

2 participants