Longer retries
This commit is contained in:
parent
2a20dfaa51
commit
60c744d381
5 changed files with 274 additions and 18 deletions
|
|
@ -196,6 +196,7 @@ async fn test_ghcr_authentication_e2e() {
|
|||
update_strategy: UpdateStrategy::LatestPatchOfPreviousMinor,
|
||||
ignore_images: vec!["localhost".to_string()],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
let client = Client::new(config);
|
||||
|
|
@ -227,5 +228,6 @@ fn create_test_config() -> Config {
|
|||
update_strategy: UpdateStrategy::LatestPatchOfPreviousMinor,
|
||||
ignore_images: vec!["localhost".to_string()],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -507,5 +507,6 @@ fn create_test_config() -> Config {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ fn test_config_default_values() {
|
|||
UpdateStrategy::LatestPatchOfPreviousMinor
|
||||
);
|
||||
assert!(!config.dry_run);
|
||||
assert_eq!(config.registry_request_interval_ms, 1000);
|
||||
assert!(config.ignore_images.is_empty());
|
||||
assert!(!config.compose_paths.is_empty());
|
||||
|
||||
|
|
@ -37,6 +38,7 @@ compose_paths:
|
|||
schedule: "0 0 3 * * *"
|
||||
update_strategy: "Latest"
|
||||
dry_run: true
|
||||
registry_request_interval_ms: 1500
|
||||
ignore_images:
|
||||
- "localhost"
|
||||
- "127.0.0.1"
|
||||
|
|
@ -57,6 +59,7 @@ registries:
|
|||
assert_eq!(config.schedule, "0 0 3 * * *");
|
||||
assert_eq!(config.update_strategy, UpdateStrategy::Latest);
|
||||
assert!(config.dry_run);
|
||||
assert_eq!(config.registry_request_interval_ms, 1500);
|
||||
assert_eq!(config.ignore_images.len(), 2);
|
||||
assert!(config.registries.contains_key("custom.registry.com"));
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ fn test_scheduler_invalid_cron_expressions() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
assert!(
|
||||
|
|
@ -52,6 +53,7 @@ fn test_scheduler_valid_cron_expressions() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
assert!(
|
||||
|
|
@ -139,6 +141,7 @@ fn test_registry_unknown_registry() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
let registry_client = RegistryClient::new(config);
|
||||
|
|
@ -199,6 +202,7 @@ async fn test_update_continues_after_service_failure() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
let updater = ComposeUpdater::new(config);
|
||||
|
|
@ -233,6 +237,7 @@ async fn test_scheduler_reports_failure_on_service_error() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
let scheduler = Scheduler::new(config, None).unwrap();
|
||||
|
|
@ -251,6 +256,7 @@ fn test_config_edge_cases() {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
assert!(Scheduler::new(minimal_config.clone(), None).is_ok());
|
||||
|
|
@ -299,5 +305,6 @@ fn create_test_config() -> Config {
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ services:
|
|||
update_strategy: UpdateStrategy::Latest,
|
||||
ignore_images: vec![],
|
||||
dry_run: true,
|
||||
..Config::default()
|
||||
};
|
||||
|
||||
let updater = ComposeUpdater::new(config);
|
||||
|
|
|
|||
Loading…
Reference in a new issue