From de2dfd1828cafa04b9b02d247bae022989ad1190 Mon Sep 17 00:00:00 2001 From: Ranjit Date: Wed, 1 May 2024 22:31:50 +0530 Subject: [PATCH] - added test for testing remote url path. --- src/config/reader.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/config/reader.rs b/src/config/reader.rs index 497b00e13a..7dea7b1b09 100644 --- a/src/config/reader.rs +++ b/src/config/reader.rs @@ -343,6 +343,7 @@ mod reader_tests { let path_dir = Path::new("abc/xyz"); let file_relative = "foo/bar/my.proto"; let file_absolute = "/foo/bar/my.proto"; + let remote_url_path = "https://raw.githubusercontent.com/tailcallhq/tailcall/main/tailcall-fixtures/fixtures/protobuf/news.proto"; assert_eq!( path_dir.to_path_buf().join(file_relative), PathBuf::from(ConfigReader::resolve_path(file_relative, Some(path_dir))) @@ -351,5 +352,9 @@ mod reader_tests { "/foo/bar/my.proto", ConfigReader::resolve_path(file_absolute, Some(path_dir)) ); + assert_eq!( + remote_url_path, + ConfigReader::resolve_path(remote_url_path, Some(path_dir)) + ); } }