mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-16 18:42:30 +03:00
5a0102b407
I am struggling to diagnose some errors and `.unwrap` is not helping, as it doesn't properly capture stack traces or anything else that might be useful. `anyhow` was built for this. Let's use it. I had to convert `SessionError` to a real `Error`, which I don't think is a bad thing. V3_GIT_ORIGIN_REV_ID: 3b8a70bb87e12e7b9e39515cd5f769fbd2cbfb39
55 lines
1.8 KiB
Rust
55 lines
1.8 KiB
Rust
#[allow(dead_code)]
|
|
mod common;
|
|
|
|
#[test]
|
|
fn test_introspect_command_with_preset_arguments() -> anyhow::Result<()> {
|
|
let common_metadata_path_string = "execute/common_metadata/custom_connector_schema.json";
|
|
let common_command_metadata_path_string = "execute/common_metadata/command_metadata.json";
|
|
|
|
common::test_introspection_expectation(
|
|
"execute/commands/functions/command_argument_presets/",
|
|
&[
|
|
common_metadata_path_string,
|
|
common_command_metadata_path_string,
|
|
],
|
|
)
|
|
}
|
|
|
|
#[test]
|
|
fn test_introspect_model_with_preset_arguments_select_many() -> anyhow::Result<()> {
|
|
let common_metadata_path_string = "execute/common_metadata/custom_connector_schema.json";
|
|
let common_command_metadata_path_string = "execute/common_metadata/command_metadata.json";
|
|
|
|
common::test_introspection_expectation(
|
|
"execute/commands/functions/model_argument_presets_select_many/",
|
|
&[
|
|
common_metadata_path_string,
|
|
common_command_metadata_path_string,
|
|
],
|
|
)
|
|
}
|
|
|
|
#[test]
|
|
fn test_introspect_model_with_preset_arguments_select_one() -> anyhow::Result<()> {
|
|
let common_metadata_path_string = "execute/common_metadata/custom_connector_schema.json";
|
|
let common_command_metadata_path_string = "execute/common_metadata/command_metadata.json";
|
|
|
|
common::test_introspection_expectation(
|
|
"execute/commands/functions/model_argument_presets_select_one/",
|
|
&[
|
|
common_metadata_path_string,
|
|
common_command_metadata_path_string,
|
|
],
|
|
)
|
|
}
|
|
|
|
#[test]
|
|
fn test_graphql_deprecated() -> anyhow::Result<()> {
|
|
let common_custom_connector_path_string =
|
|
"execute/common_metadata/custom_connector_schema.json";
|
|
common::test_introspection_expectation(
|
|
"execute/deprecated",
|
|
&[common_custom_connector_path_string],
|
|
)
|
|
}
|