mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-22 10:24:35 +02:00
fix: persist original file path when using bases (#672)
* fix: persist original file path when using bases Prior to this change, the resulting lock file was called `<bases[0]>.lock`, instead of `<filename>.lock`. This change ensures the final, merged state has the correct `.FilePath`. * test: Assert proper FilePath in layered HelmState
This commit is contained in:
committed by
KUOKA Yusuke
parent
34fbfb4fd0
commit
72425aebfc
@@ -1127,6 +1127,10 @@ helmDefaults:
|
|||||||
if st.Releases[1].Values[0] != "{{`{{.Release.Name}}`}}/values.yaml" {
|
if st.Releases[1].Values[0] != "{{`{{.Release.Name}}`}}/values.yaml" {
|
||||||
t.Errorf("unexpected releases[0].missingFileHandler: expected={{`{{.Release.Name}}`}}/values.yaml, got=%s", st.Releases[1].Values[0])
|
t.Errorf("unexpected releases[0].missingFileHandler: expected={{`{{.Release.Name}}`}}/values.yaml, got=%s", st.Releases[1].Values[0])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if st.FilePath != yamlFile {
|
||||||
|
t.Errorf("unexpected filePath: expected=%s, got=%s", yamlFile, st.FilePath)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestLoadDesiredStateFromYaml_MultiPartTemplate(t *testing.T) {
|
func TestLoadDesiredStateFromYaml_MultiPartTemplate(t *testing.T) {
|
||||||
|
|||||||
@@ -148,6 +148,8 @@ func (c *StateCreator) ParseAndLoad(content []byte, baseDir, file string, envNam
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
state.FilePath = file
|
||||||
|
|
||||||
return state, nil
|
return state, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user