Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f8a863

Browse filesBrowse files
committed
test: update extension test to run with specific postgresql version
1 parent 4a94355 commit 7f8a863
Copy full SHA for 7f8a863

File tree

Expand file treeCollapse file tree

3 files changed

+10
-0
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+10
-0
lines changed

‎postgresql_embedded/src/lib.rs

Copy file name to clipboardExpand all lines: postgresql_embedded/src/lib.rs
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ use std::sync::LazyLock;
134134
/// The latest PostgreSQL version requirement
135135
pub static LATEST: VersionReq = VersionReq::STAR;
136136

137+
/// The latest PostgreSQL version 17
138+
pub static V17: LazyLock<VersionReq> = LazyLock::new(|| VersionReq::parse("=17").unwrap());
139+
137140
/// The latest PostgreSQL version 16
138141
pub static V16: LazyLock<VersionReq> = LazyLock::new(|| VersionReq::parse("=16").unwrap());
139142

@@ -172,6 +175,11 @@ mod tests {
172175
assert_eq!(LATEST.to_string(), "*");
173176
}
174177

178+
#[test]
179+
fn test_version_17() {
180+
assert_eq!(V17.to_string(), "=17");
181+
}
182+
175183
#[test]
176184
fn test_version_16() {
177185
assert_eq!(V16.to_string(), "=16");

‎postgresql_extensions/tests/blocking.rs

Copy file name to clipboardExpand all lines: postgresql_extensions/tests/blocking.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ fn test_get_available_extensions() -> anyhow::Result<()> {
2121
fn test_lifecycle() -> anyhow::Result<()> {
2222
let installation_dir = tempfile::tempdir()?.path().to_path_buf();
2323
let settings = postgresql_embedded::Settings {
24+
version: postgresql_embedded::VersionReq::parse("=16.4.0")?,
2425
installation_dir: installation_dir.clone(),
2526
..Default::default()
2627
};

‎postgresql_extensions/tests/extensions.rs

Copy file name to clipboardExpand all lines: postgresql_extensions/tests/extensions.rs
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ async fn test_get_available_extensions() -> Result<()> {
2020
async fn test_lifecycle() -> Result<()> {
2121
let installation_dir = tempfile::tempdir()?.path().to_path_buf();
2222
let settings = postgresql_embedded::Settings {
23+
version: postgresql_embedded::VersionReq::parse("=16.4.0")?,
2324
installation_dir: installation_dir.clone(),
2425
..Default::default()
2526
};

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.