mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-11-01 07:02:30 +00:00
Keep installer tests focused on behavioral contracts
This commit is contained in:
parent
e047a9adff
commit
6ba50e0807
2 changed files with 2 additions and 18 deletions
|
|
@ -956,9 +956,6 @@ async fn token_install_finish_persists_settings_env_and_vault() {
|
|||
let settings = std::fs::read_to_string(&config_path).unwrap();
|
||||
assert!(settings.contains("https://fabro.example.com"));
|
||||
assert!(settings.contains("strategy = \"token\""));
|
||||
let document: toml::Value = toml::from_str(&settings).unwrap();
|
||||
assert!(document.get("run").is_none());
|
||||
assert!(document.get("environments").is_none());
|
||||
assert_sandbox_provider_policy(&settings, true, true, false);
|
||||
assert_no_legacy_environment_dir(&temp_dir);
|
||||
let default_environment = seeded_default_environment(&temp_dir).await;
|
||||
|
|
@ -2609,10 +2606,6 @@ async fn sandbox_switching_from_daytona_to_docker_drops_saved_key() {
|
|||
)
|
||||
.await;
|
||||
|
||||
let settings = std::fs::read_to_string(&config_path).unwrap();
|
||||
let document: toml::Value = toml::from_str(&settings).unwrap();
|
||||
assert!(document.get("run").is_none());
|
||||
assert!(document.get("environments").is_none());
|
||||
assert_no_legacy_environment_dir(&temp_dir);
|
||||
let default_environment = seeded_default_environment(&temp_dir).await;
|
||||
assert_eq!(default_environment.settings.provider.to_string(), "docker");
|
||||
|
|
@ -2724,9 +2717,6 @@ async fn daytona_install_finish_writes_settings_and_vault_secret() {
|
|||
.await;
|
||||
|
||||
let settings = std::fs::read_to_string(&config_path).unwrap();
|
||||
let document: toml::Value = toml::from_str(&settings).unwrap();
|
||||
assert!(document.get("run").is_none());
|
||||
assert!(document.get("environments").is_none());
|
||||
assert_sandbox_provider_policy(&settings, true, false, true);
|
||||
assert_no_legacy_environment_dir(&temp_dir);
|
||||
let default_environment = seeded_default_environment(&temp_dir).await;
|
||||
|
|
|
|||
|
|
@ -1324,7 +1324,6 @@ stale = "remove-me"
|
|||
.and_then(toml::Value::as_str),
|
||||
Some("/srv/fabro/objects")
|
||||
);
|
||||
assert!(server.get("slatedb").is_none());
|
||||
assert!(plan.writes.is_empty());
|
||||
assert_eq!(plan.removals.len(), 2);
|
||||
}
|
||||
|
|
@ -1353,7 +1352,6 @@ stale = "remove-me"
|
|||
.and_then(toml::Value::as_str),
|
||||
Some("artifacts")
|
||||
);
|
||||
assert!(server.get("slatedb").is_none());
|
||||
assert!(plan.writes.is_empty());
|
||||
}
|
||||
|
||||
|
|
@ -1392,26 +1390,22 @@ stale = "remove-me"
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn write_sandbox_settings_records_docker_policy_without_run_settings() {
|
||||
fn write_sandbox_settings_records_docker_policy() {
|
||||
let mut doc = toml::Value::Table(toml::Table::default());
|
||||
write_sandbox_settings(&mut doc, InstallSandboxSelection::Docker, true)
|
||||
.expect("docker sandbox selection should succeed");
|
||||
|
||||
assert!(doc.get("run").is_none());
|
||||
assert!(doc.get("environments").is_none());
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "local"), Some(true));
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "docker"), Some(true));
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "daytona"), Some(false));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn write_sandbox_settings_records_daytona_policy_without_run_settings() {
|
||||
fn write_sandbox_settings_records_daytona_policy() {
|
||||
let mut doc = toml::Value::Table(toml::Table::default());
|
||||
write_sandbox_settings(&mut doc, InstallSandboxSelection::Daytona, true)
|
||||
.expect("daytona sandbox selection should succeed");
|
||||
|
||||
assert!(doc.get("run").is_none());
|
||||
assert!(doc.get("environments").is_none());
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "local"), Some(true));
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "docker"), Some(false));
|
||||
assert_eq!(sandbox_provider_enabled(&doc, "daytona"), Some(true));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue