Tests use the README's example drive id instead of a real drive's #5
+9
-9
@@ -70,26 +70,26 @@ mod tests {
|
|||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn the_mcp_panel_url_is_used_as_given() {
|
async fn the_mcp_panel_url_is_used_as_given() {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8"),
|
endpoint("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456"),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint(" https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8/ \n"),
|
endpoint(" https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456/ \n"),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned())
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned())
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[tokio::test]
|
#[tokio::test]
|
||||||
async fn a_drive_page_address_finds_the_same_endpoint() {
|
async fn a_drive_page_address_finds_the_same_endpoint() {
|
||||||
for page in [
|
for page in [
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8?path=notes",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456?path=notes",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/notes/today.md",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456/notes/today.md",
|
||||||
"https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8/manage#members",
|
"https://aindrive.ainetwork.ai/d/AbCdEf123456/manage#members",
|
||||||
] {
|
] {
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
endpoint(page),
|
endpoint(page),
|
||||||
Ok("https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8".to_owned()),
|
Ok("https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456".to_owned()),
|
||||||
"{page}"
|
"{page}"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,13 +8,13 @@ use crate::sdk::{
|
|||||||
};
|
};
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
|
|
||||||
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/KQHGpl8hFXq8";
|
const ENDPOINT: &str = "https://aindrive.ainetwork.ai/mcp/d/AbCdEf123456";
|
||||||
|
|
||||||
fn config() -> Vec<(String, Setting)> {
|
fn config() -> Vec<(String, Setting)> {
|
||||||
vec![
|
vec![
|
||||||
(
|
(
|
||||||
"url".to_owned(),
|
"url".to_owned(),
|
||||||
Setting::Text("https://aindrive.ainetwork.ai/d/KQHGpl8hFXq8".to_owned()),
|
Setting::Text("https://aindrive.ainetwork.ai/d/AbCdEf123456".to_owned()),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"token".to_owned(),
|
"token".to_owned(),
|
||||||
|
|||||||
Reference in New Issue
Block a user