mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
tests: comprehensive config migration tests
Add testing for the settings that had to be explicitly migrated.
This commit is contained in:
parent
4633242503
commit
9063ea9173
@ -38,6 +38,10 @@ InvokeAI:
|
|||||||
ignore_missing_core_models: false
|
ignore_missing_core_models: false
|
||||||
Paths:
|
Paths:
|
||||||
outdir: /some/outputs/dir
|
outdir: /some/outputs/dir
|
||||||
|
conf_path: /custom/models.yaml
|
||||||
|
Model Cache:
|
||||||
|
max_cache_size: 100
|
||||||
|
max_vram_cache_size: 50
|
||||||
"""
|
"""
|
||||||
|
|
||||||
invalid_config = """
|
invalid_config = """
|
||||||
@ -77,6 +81,9 @@ def test_migrate_v3_config_from_file(tmp_path: Path):
|
|||||||
assert config.outputs_dir == Path("/some/outputs/dir")
|
assert config.outputs_dir == Path("/some/outputs/dir")
|
||||||
assert config.host == "192.168.1.1"
|
assert config.host == "192.168.1.1"
|
||||||
assert config.port == 8080
|
assert config.port == 8080
|
||||||
|
assert config.ram == 100
|
||||||
|
assert config.vram == 50
|
||||||
|
assert config.legacy_models_yaml_path == Path("/custom/models.yaml")
|
||||||
# This should be stripped out
|
# This should be stripped out
|
||||||
assert not hasattr(config, "esrgan")
|
assert not hasattr(config, "esrgan")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user