Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

overview: fix "internal error: no overview data found" on 32 bit architectures - fixes #9723

Nick Craig-Wood5629f2668c69
diff --git a/backend/overview/overview.go b/backend/overview/overview.go
index 11af24fd3..ebf068e7b 100644
--- a/backend/overview/overview.go
+++ b/backend/overview/overview.go
@@ -26,7 +26,7 @@ type BackendConfig struct {
Remote string `yaml:"remote"`
Features []string `yaml:"features"`
Hashes []string `yaml:"hashes"`
- Precision int `yaml:"precision"`
+ Precision int64 `yaml:"precision"`
}
// GetBackendConfig from docs/data/backends
diff --git a/backend/overview/overview_test.go b/backend/overview/overview_test.go
index f7441bfb8..260a0ce72 100644
--- a/backend/overview/overview_test.go
+++ b/backend/overview/overview_test.go
@@ -1,8 +1,10 @@
package overview
import (
+ "strings"
"testing"
+ "github.com/rclone/rclone/docs/data/backends"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@@ -53,3 +55,17 @@ func TestGetBackendConfig(t *testing.T) {
assert.Equal(t, expectedMemoryConfig, conf, "parsed memory.yaml should match")
}
+
+// Check every embedded backend YAML file parses on all architectures
+func TestGetBackendConfigAll(t *testing.T) {
+ entries, err := backends.BackendFS.ReadDir(".")
+ require.NoError(t, err)
+ require.NotEmpty(t, entries)
+
+ for _, entry := range entries {
+ name := strings.TrimSuffix(entry.Name(), ".yaml")
+ conf, err := GetBackendConfig(name)
+ assert.NoError(t, err, "failed to load %s", entry.Name())
+ assert.NotNil(t, conf)
+ }
+}