overwrite

This commit is contained in:
admju 2024-09-11 13:28:39 +00:00
parent 279f93224f
commit 9561dc5493
3 changed files with 26 additions and 2 deletions

View File

@ -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 {

View File

@ -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")
}

View 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>