package common import "testing" func TestConfig_Validate_MissingAuthAPIKey(t *testing.T) { cfg := &Config{ RustFSAccessKeyID: "key", RustFSSecretAccessKey: "secret", RustFSEndpoint: "http://localhost:9000", } if err := cfg.Validate(); err == nil { t.Error("expected error when AuthAPIKey is empty, got nil") } } func TestConfig_Validate_MissingRustFSAccessKeyID(t *testing.T) { cfg := &Config{ AuthAPIKey: "api-key", RustFSSecretAccessKey: "secret", RustFSEndpoint: "http://localhost:9000", } if err := cfg.Validate(); err == nil { t.Error("expected error when RustFSAccessKeyID is empty, got nil") } } func TestConfig_Validate_AllFieldsPresent(t *testing.T) { cfg := &Config{ AuthAPIKey: "api-key", RustFSAccessKeyID: "access-key", RustFSSecretAccessKey: "secret-key", RustFSEndpoint: "http://localhost:9000", } if err := cfg.Validate(); err != nil { t.Errorf("expected nil when all fields present, got error: %v", err) } }