Add test for import job handler. Improve error messages.

This commit is contained in:
Jan Eitzinger
2022-09-23 15:23:45 +02:00
parent c9184a7575
commit 5c715b6ec2
8 changed files with 838 additions and 7 deletions

View File

@@ -109,7 +109,7 @@ func (fsa *FsArchive) LoadClusterCfg(name string) (*schema.Cluster, error) {
}
if config.Keys.Validate {
if err := schema.Validate(schema.ClusterCfg, bytes.NewReader(b)); err != nil {
return &schema.Cluster{}, err
return &schema.Cluster{}, fmt.Errorf("Validate cluster config: %v\n", err)
}
}
return DecodeCluster(bytes.NewReader(b))