-
Notifications
You must be signed in to change notification settings - Fork 914
fix(coderd/database): remove linux build tags from db package #16633
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
Conversation
@evgeniy-scherbina ran into this. Basically he is running on a mac, and unable to run these tests locally. However it seems docker does not exist in our CI to run postgres?? I figured this might be resolved somehow to run the other PG tests. Do you have any recommendations to allow these tests to be run locally? I'm ok if these tests are still skipped on mac CI, we just want them to being able to be run locally on Mac. |
@Emyrk @evgeniy-scherbina These tests are failing because they are running as part of the in-mem test suite (test-go rather than test-go-pg). GitHub runners for macOS and Windows can't run Docker, since it requires Linux running in a VM, these runners are VMs themselves, and they don't support nested virtualization. For a fix, I'd modify each failing test to include if !dbtestutil.WillUsePostgres() {
t.Skip("this test requires postgres")
} And run the tests locally with The tests do pass in CI in the PG suite because we use embedded postgres to set up the db before running them. As a sidenote, we recently switched our macOS runners to run on depot, which uses physical hardware AFAIK, so we could set up Docker there eventually. |
And one more thing - there's one test that has a hard dependency on Docker:
I'd skip it conditionally based on whether Docker is available. |
fdbb091
to
01d399b
Compare
@Emyrk @hugodutka fixed CI, could you pls. review it?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG 👍
@Emyrk
Remove linux build tags from database package to make sure we can run tests on Mac OS.