Skip to content

Commit

Permalink
- added test for testing remote url path.
Browse files Browse the repository at this point in the history
  • Loading branch information
laststylebender14 committed May 1, 2024
1 parent 78c4566 commit de2dfd1
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand All @@ -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))
);
}
}

0 comments on commit de2dfd1

Please sign in to comment.