-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4152094
commit 4f554a7
Showing
24 changed files
with
416 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/.cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[target.'cfg(target_os="macos")'] | ||
# Postgres symbols won't be available until runtime | ||
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] |
7 changes: 7 additions & 0 deletions
7
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
.idea/ | ||
/target | ||
*.iml | ||
**/*.rs.bk | ||
Cargo.lock | ||
Dockerfile |
29 changes: 29 additions & 0 deletions
29
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "test_pgrx_extension" | ||
version = "0.0.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
default = ["pg15"] | ||
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ] | ||
pg_test = [] | ||
|
||
[dependencies] | ||
pgrx = "=0.8.0" | ||
|
||
[dev-dependencies] | ||
pgrx-tests = "=0.8.0" | ||
|
||
[profile.dev] | ||
panic = "unwind" | ||
lto = "thin" | ||
|
||
[profile.release] | ||
panic = "unwind" | ||
opt-level = 3 | ||
lto = "fat" | ||
codegen-units = 1 |
1 change: 1 addition & 0 deletions
1
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test license file. |
3 changes: 3 additions & 0 deletions
3
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/Trunk.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[extension] | ||
name = "test_pgrx_extension" | ||
version = "0.0.0" |
34 changes: 34 additions & 0 deletions
34
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use pgrx::prelude::*; | ||
|
||
pgrx::pg_module_magic!(); | ||
|
||
#[pg_extern] | ||
fn hello_test_extension() -> &'static str { | ||
"Hello, test_extension" | ||
} | ||
|
||
#[cfg(any(test, feature = "pg_test"))] | ||
#[pg_schema] | ||
mod tests { | ||
use pgrx::prelude::*; | ||
|
||
#[pg_test] | ||
fn test_hello_test_extension() { | ||
assert_eq!("Hello, test_extension", crate::hello_test_extension()); | ||
} | ||
|
||
} | ||
|
||
/// This module is required by `cargo pgrx test` invocations. | ||
/// It must be visible at the root of your extension crate. | ||
#[cfg(test)] | ||
pub mod pg_test { | ||
pub fn setup(_options: Vec<&str>) { | ||
// perform one-off initialization when the pg_test framework starts | ||
} | ||
|
||
pub fn postgresql_conf_options() -> Vec<&'static str> { | ||
// return any postgresql.conf settings that are required for your tests | ||
vec![] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml/test_pgrx_extension.control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
comment = 'test_pgrx_extension: Created by pgrx' | ||
default_version = '@CARGO_VERSION@' | ||
module_pathname = '$libdir/test_pgrx_extension' | ||
relocatable = false | ||
superuser = false |
3 changes: 3 additions & 0 deletions
3
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/.cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[target.'cfg(target_os="macos")'] | ||
# Postgres symbols won't be available until runtime | ||
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] |
7 changes: 7 additions & 0 deletions
7
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
.idea/ | ||
/target | ||
*.iml | ||
**/*.rs.bk | ||
Cargo.lock | ||
Dockerfile |
29 changes: 29 additions & 0 deletions
29
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/Cargo.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[package] | ||
name = "test_pgrx_extension" | ||
version = "0.0.0" | ||
edition = "2021" | ||
publish = false | ||
|
||
[lib] | ||
crate-type = ["cdylib"] | ||
|
||
[features] | ||
default = ["pg15"] | ||
pg15 = ["pgrx/pg15", "pgrx-tests/pg15" ] | ||
pg_test = [] | ||
|
||
[dependencies] | ||
pgrx = "=0.8.0" | ||
|
||
[dev-dependencies] | ||
pgrx-tests = "=0.8.0" | ||
|
||
[profile.dev] | ||
panic = "unwind" | ||
lto = "thin" | ||
|
||
[profile.release] | ||
panic = "unwind" | ||
opt-level = 3 | ||
lto = "fat" | ||
codegen-units = 1 |
1 change: 1 addition & 0 deletions
1
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Test license file. |
3 changes: 3 additions & 0 deletions
3
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/Trunk.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[extension] | ||
name = "wrong_name" | ||
version = "0.0.0" |
34 changes: 34 additions & 0 deletions
34
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/src/lib.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use pgrx::prelude::*; | ||
|
||
pgrx::pg_module_magic!(); | ||
|
||
#[pg_extern] | ||
fn hello_test_extension() -> &'static str { | ||
"Hello, test_extension" | ||
} | ||
|
||
#[cfg(any(test, feature = "pg_test"))] | ||
#[pg_schema] | ||
mod tests { | ||
use pgrx::prelude::*; | ||
|
||
#[pg_test] | ||
fn test_hello_test_extension() { | ||
assert_eq!("Hello, test_extension", crate::hello_test_extension()); | ||
} | ||
|
||
} | ||
|
||
/// This module is required by `cargo pgrx test` invocations. | ||
/// It must be visible at the root of your extension crate. | ||
#[cfg(test)] | ||
pub mod pg_test { | ||
pub fn setup(_options: Vec<&str>) { | ||
// perform one-off initialization when the pg_test framework starts | ||
} | ||
|
||
pub fn postgresql_conf_options() -> Vec<&'static str> { | ||
// return any postgresql.conf settings that are required for your tests | ||
vec![] | ||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_name/test_pgrx_extension.control
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
comment = 'test_pgrx_extension: Created by pgrx' | ||
default_version = '@CARGO_VERSION@' | ||
module_pathname = '$libdir/test_pgrx_extension' | ||
relocatable = false | ||
superuser = false |
3 changes: 3 additions & 0 deletions
3
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_version/.cargo/config.toml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[target.'cfg(target_os="macos")'] | ||
# Postgres symbols won't be available until runtime | ||
rustflags = ["-Clink-arg=-Wl,-undefined,dynamic_lookup"] |
7 changes: 7 additions & 0 deletions
7
cli/tests/test_trunk_toml_dirs/pgrx_with_trunk_toml_bad_version/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.DS_Store | ||
.idea/ | ||
/target | ||
*.iml | ||
**/*.rs.bk | ||
Cargo.lock | ||
Dockerfile |
Oops, something went wrong.