fix(build): move EstimateBackupSize to platform-independent file
Some checks failed
CI/CD / Test (push) Failing after 4s
CI/CD / Generate SBOM (push) Has been skipped
CI/CD / Lint (push) Failing after 4s
CI/CD / Build (darwin-amd64) (push) Has been skipped
CI/CD / Build (linux-amd64) (push) Has been skipped
CI/CD / Build (darwin-arm64) (push) Has been skipped
CI/CD / Build (linux-arm64) (push) Has been skipped
CI/CD / Release (push) Has been skipped
CI/CD / Build & Push Docker Image (push) Has been skipped
CI/CD / Mirror to GitHub (push) Has been skipped

Fixes Windows, OpenBSD, and NetBSD builds by extracting
EstimateBackupSize from disk_check.go (which has build tags
excluding those platforms) to a new estimate.go file.
This commit is contained in:
2025-12-13 21:55:39 +01:00
parent 573f2776d7
commit f033b02cec
10 changed files with 126 additions and 125 deletions

View File

@@ -12,7 +12,7 @@ func TestSelectorConfig(t *testing.T) {
User: "root",
DataDir: "/var/lib/mysql",
CloneMinVersion: "8.0.17",
CloneMinSize: 1024 * 1024 * 1024, // 1GB
CloneMinSize: 1024 * 1024 * 1024, // 1GB
SnapshotMinSize: 10 * 1024 * 1024 * 1024, // 10GB
PreferClone: true,
AllowMysqldump: true,
@@ -111,9 +111,9 @@ func TestSelectionReason(t *testing.T) {
func TestEngineScoring(t *testing.T) {
// Test that scores are calculated correctly
tests := []struct {
name string
info DatabaseInfo
expectedBest string
name string
info DatabaseInfo
expectedBest string
}{
{
name: "large DB with clone plugin",