mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Enhance logging and fix regression in TODO.txt
- Updated the logging format in TODO.txt to provide clearer information about file operations and potential issues, including warnings about lossy string conversions. - Added a note to address a regression in logging behavior that may affect users relying on specific property formats. - Refactored the `flatten_tree` function in `git.rs` to improve parameter clarity by renaming the repository argument. - Updated the `mcp.rs` test to utilize a more concise method for checking integer types in the timeout configuration. - Introduced a new method in `TestServeSession` to fetch git metadata, improving the test suite's ability to validate git-related functionality. These changes aim to improve logging clarity, address regressions, and enhance test coverage for git metadata handling.
This commit is contained in:
parent
059abd1245
commit
f24e991aca
5 changed files with 64 additions and 43 deletions
|
|
@ -16,8 +16,8 @@ use serde::Deserialize;
|
|||
use tempfile::{tempdir, TempDir};
|
||||
|
||||
use librojo::web_api::{
|
||||
ReadResponse, SerializeResponse, ServerInfoResponse, SocketPacket, SocketPacketBody,
|
||||
SocketPacketType,
|
||||
GitMetadata, ReadResponse, SerializeResponse, ServerInfoResponse, SocketPacket,
|
||||
SocketPacketBody, SocketPacketType,
|
||||
};
|
||||
use rojo_insta_ext::RedactionMap;
|
||||
|
||||
|
|
@ -340,6 +340,13 @@ impl TestServeSession {
|
|||
Ok(deserialize_msgpack(&body).expect("Server returned malformed response"))
|
||||
}
|
||||
|
||||
pub fn get_api_git_metadata(&self) -> Result<Option<GitMetadata>, reqwest::Error> {
|
||||
let url = format!("http://localhost:{}/api/git-metadata", self.port);
|
||||
let body = reqwest::blocking::get(url)?.bytes()?;
|
||||
|
||||
Ok(deserialize_msgpack(&body).expect("Server returned malformed response"))
|
||||
}
|
||||
|
||||
pub fn get_api_read(&self, id: Ref) -> Result<ReadResponse<'_>, reqwest::Error> {
|
||||
let url = format!("http://localhost:{}/api/read/{}", self.port, id);
|
||||
let body = reqwest::blocking::get(url)?.bytes()?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue