overwrite
This commit is contained in:
parent
279f93224f
commit
9561dc5493
@ -14,6 +14,8 @@ type ChartData struct {
|
||||
Opts string `yaml:"helm_opts"`
|
||||
Values map[string]string `yaml:"helm_values"`
|
||||
FileValues []string `yaml:"helm_filevalues"`
|
||||
|
||||
Overwrite string `yaml:"helm_overwrite"`
|
||||
}
|
||||
|
||||
type repoData struct {
|
||||
|
@ -7,7 +7,7 @@ import (
|
||||
)
|
||||
|
||||
|
||||
func TestReadConfChart(t *testing.T){
|
||||
func _TestReadConfChart(t *testing.T) {
|
||||
src := filepath.Join(TEST_SRC_DIR, "oc.yml")
|
||||
|
||||
assert.FileExists(t, src, "FromConfigFile error")
|
||||
@ -37,5 +37,14 @@ func TestReadConfChart(t *testing.T){
|
||||
myfirstrelease := data1.Charts[0]
|
||||
assert.Equal(t, "myfirstrelease", myfirstrelease.Name, "FromConfigFile error")
|
||||
assert.Equal(t, "https://zzzz/myfirstchart-0.1.0.tgz", myfirstrelease.Url, "FromConfigFile error")
|
||||
|
||||
}
|
||||
|
||||
func TestReadConfChartOverwrite(t *testing.T){
|
||||
src := filepath.Join(TEST_SRC_DIR, "oc_overwrite.yml")
|
||||
|
||||
assert.FileExists(t, src, "FromConfigFile error")
|
||||
|
||||
data, _ := FromConfigFile(src)
|
||||
// Nombre de lettres
|
||||
assert.Equal(t, 70, len(data[0].Charts[0].Overwrite), "TestReadConfChartOverwrite error")
|
||||
}
|
13
test/chart/oc_overwrite.yml
Normal file
13
test/chart/oc_overwrite.yml
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
|
||||
opencloud:
|
||||
- charts:
|
||||
- name: mongo
|
||||
chart: bitnami/wordpress
|
||||
version: 23.1.0
|
||||
helm_overwrite: |
|
||||
---
|
||||
# Texte Mot de passe
|
||||
# mongo:
|
||||
# name: <user>
|
||||
# password: <_mdp>
|
Loading…
Reference in New Issue
Block a user