Merge "Fix metadata loading by config module"
This commit is contained in:
commit
e12c15a4c8
@ -1088,7 +1088,7 @@ func (c *Config) CurrentContextManifestMetadata() (*Metadata, error) {
|
||||
return nil, err
|
||||
}
|
||||
meta := &Metadata{}
|
||||
err = util.ReadYAMLFile(manifest.MetadataPath, meta)
|
||||
err = util.ReadYAMLFile(filepath.Join(manifest.TargetPath, manifest.MetadataPath), meta)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -594,7 +594,7 @@ func TestCurrentContextManifestMetadata(t *testing.T) {
|
||||
}{
|
||||
{
|
||||
name: "default metadata",
|
||||
metaPath: "testdata/metadata.yaml",
|
||||
metaPath: "metadata.yaml",
|
||||
expectErr: false,
|
||||
currentContext: "testContext",
|
||||
meta: &config.Metadata{
|
||||
@ -630,7 +630,7 @@ func TestCurrentContextManifestMetadata(t *testing.T) {
|
||||
}
|
||||
manifest := &config.Manifest{
|
||||
MetadataPath: tt.metaPath,
|
||||
TargetPath: ".",
|
||||
TargetPath: "testdata",
|
||||
}
|
||||
conf.Manifests = map[string]*config.Manifest{
|
||||
"testManifest": manifest,
|
||||
|
Loading…
x
Reference in New Issue
Block a user