Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions postgresql_embedded/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ use std::sync::LazyLock;
/// The latest PostgreSQL version requirement
pub static LATEST: VersionReq = VersionReq::STAR;

/// The latest PostgreSQL version 17
pub static V17: LazyLock<VersionReq> = LazyLock::new(|| VersionReq::parse("=17").unwrap());

/// The latest PostgreSQL version 16
pub static V16: LazyLock<VersionReq> = LazyLock::new(|| VersionReq::parse("=16").unwrap());

Expand Down Expand Up @@ -172,6 +175,11 @@ mod tests {
assert_eq!(LATEST.to_string(), "*");
}

#[test]
fn test_version_17() {
assert_eq!(V17.to_string(), "=17");
}

#[test]
fn test_version_16() {
assert_eq!(V16.to_string(), "=16");
Expand Down
1 change: 1 addition & 0 deletions postgresql_extensions/tests/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fn test_get_available_extensions() -> anyhow::Result<()> {
fn test_lifecycle() -> anyhow::Result<()> {
let installation_dir = tempfile::tempdir()?.path().to_path_buf();
let settings = postgresql_embedded::Settings {
version: postgresql_embedded::VersionReq::parse("=16.4.0")?,
installation_dir: installation_dir.clone(),
..Default::default()
};
Expand Down
1 change: 1 addition & 0 deletions postgresql_extensions/tests/extensions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ async fn test_get_available_extensions() -> Result<()> {
async fn test_lifecycle() -> Result<()> {
let installation_dir = tempfile::tempdir()?.path().to_path_buf();
let settings = postgresql_embedded::Settings {
version: postgresql_embedded::VersionReq::parse("=16.4.0")?,
installation_dir: installation_dir.clone(),
..Default::default()
};
Expand Down