fix: create the update directory for fresh named volumes [CI]
ci/woodpecker/push/main-amd64-build Pipeline was successful

ConfigStore.Write only created the config root, so a new volume without update/ made update offers fail with IO_PathNotFound. Create the parent directory on write and ship an empty update/ in the node images.
This commit is contained in:
justme committed 2026-10-07 02:51:39 +08:00
1 parent ef75c9f510
commit 7613f67fed
3 files changed
+21 -1

No files matched your search

@@ -82,4 +82,20 @@ public sealed class ProbeTests
Directory.Delete(directory, recursive: true);
}
}
[Fact]
public void ConfigStore_CreatesSubdirectories_ForFreshVolumes()
{
// 新建的命名卷里没有 update/:面板转来的更新清单要能写进去
string directory = NewDirectory();
try
{
new ConfigStore(directory).Write("update/offer.manifest", "{}"u8.ToArray());
Assert.True(File.Exists(Path.Combine(directory, "update", "offer.manifest")));
}
finally
{
Directory.Delete(directory, recursive: true);
}
}
}