testcontainers-rs-modules-community
testcontainers-rs-modules-community copied to clipboard
feat: implemented `Postgres::with_init_sql`
Resolves #164
The implementation is a bit hacky, am open to better approaches or other feedback ^^
Thank you for the contribution! ❤️ Left a couple of suggestions that could significantly expand the capabilities of the crate, but they need to be discussed and possibly postponed
Now it's possible with with_copy_to:
image.with_copy_to(
"/docker-entrypoint-initdb.d/init.sql",
include_bytes!("initdb.sql").to_vec(),
)
Which I found simple enough. So we can actually provide a guidance and probably shortcut for it. May simplify work done here
Yea that definitely cleans things up a ton. Thanks 🙏 Sorry for the lacking progress, I was on vacation for the last month and am still in a bit of a catch-up mode work wise.
=> This PR might take a few weeks before I can actually invest the time it deserves