feat: Added Lidarr CLI support for fetching the host config and the security config
This commit is contained in:
@@ -8,7 +8,9 @@ mod tests {
|
||||
DownloadRecord, DownloadStatus, DownloadsResponse, Member, MetadataProfile, NewItemMonitorType,
|
||||
SystemStatus,
|
||||
};
|
||||
use crate::models::servarr_models::{DiskSpace, QualityProfile, RootFolder, Tag};
|
||||
use crate::models::servarr_models::{
|
||||
DiskSpace, HostConfig, QualityProfile, RootFolder, SecurityConfig, Tag,
|
||||
};
|
||||
use crate::models::{
|
||||
Serdeable,
|
||||
lidarr_models::{Artist, ArtistStatistics, ArtistStatus, LidarrSerdeable, Ratings},
|
||||
@@ -291,6 +293,18 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lidarr_serdeable_from_host_config() {
|
||||
let host_config = HostConfig {
|
||||
port: 8686,
|
||||
..HostConfig::default()
|
||||
};
|
||||
|
||||
let lidarr_serdeable: LidarrSerdeable = host_config.clone().into();
|
||||
|
||||
assert_eq!(lidarr_serdeable, LidarrSerdeable::HostConfig(host_config));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lidarr_serdeable_from_quality_profiles() {
|
||||
let quality_profiles = vec![QualityProfile {
|
||||
@@ -321,6 +335,21 @@ mod tests {
|
||||
assert_eq!(lidarr_serdeable, LidarrSerdeable::RootFolders(root_folders));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lidarr_serdeable_from_security_config() {
|
||||
let security_config = SecurityConfig {
|
||||
api_key: "test-key".to_owned(),
|
||||
..SecurityConfig::default()
|
||||
};
|
||||
|
||||
let lidarr_serdeable: LidarrSerdeable = security_config.clone().into();
|
||||
|
||||
assert_eq!(
|
||||
lidarr_serdeable,
|
||||
LidarrSerdeable::SecurityConfig(security_config)
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lidarr_serdeable_from_system_status() {
|
||||
let system_status = SystemStatus {
|
||||
|
||||
Reference in New Issue
Block a user