mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
DataSources is now common to Secrets and ConfigMaps.
This commit is contained in:
@@ -95,9 +95,11 @@ func TestConstructConfigMap(t *testing.T) {
|
||||
{
|
||||
description: "construct config map from env",
|
||||
input: types.ConfigMapArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "envConfigMap"},
|
||||
DataSources: types.DataSources{
|
||||
EnvSource: "configmap/app.env",
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "envConfigMap",
|
||||
DataSources: types.DataSources{
|
||||
EnvSource: "configmap/app.env",
|
||||
},
|
||||
},
|
||||
},
|
||||
options: nil,
|
||||
@@ -106,9 +108,11 @@ func TestConstructConfigMap(t *testing.T) {
|
||||
{
|
||||
description: "construct config map from file",
|
||||
input: types.ConfigMapArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "fileConfigMap"},
|
||||
DataSources: types.DataSources{
|
||||
FileSources: []string{"configmap/app-init.ini", "configmap/app.bin"},
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "fileConfigMap",
|
||||
DataSources: types.DataSources{
|
||||
FileSources: []string{"configmap/app-init.ini", "configmap/app.bin"},
|
||||
},
|
||||
},
|
||||
},
|
||||
options: nil,
|
||||
@@ -117,9 +121,11 @@ func TestConstructConfigMap(t *testing.T) {
|
||||
{
|
||||
description: "construct config map from literal",
|
||||
input: types.ConfigMapArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "literalConfigMap"},
|
||||
DataSources: types.DataSources{
|
||||
LiteralSources: []string{"a=x", "b=y", "c=\"Hello World\"", "d='true'"},
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "literalConfigMap",
|
||||
DataSources: types.DataSources{
|
||||
LiteralSources: []string{"a=x", "b=y", "c=\"Hello World\"", "d='true'"},
|
||||
},
|
||||
},
|
||||
},
|
||||
options: &types.GeneratorOptions{
|
||||
|
||||
@@ -93,9 +93,11 @@ func TestConstructSecret(t *testing.T) {
|
||||
{
|
||||
description: "construct secret from env",
|
||||
input: types.SecretArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "envSecret"},
|
||||
DataSources: types.DataSources{
|
||||
EnvSource: "secret/app.env",
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "envSecret",
|
||||
DataSources: types.DataSources{
|
||||
EnvSource: "secret/app.env",
|
||||
},
|
||||
},
|
||||
},
|
||||
options: nil,
|
||||
@@ -104,9 +106,11 @@ func TestConstructSecret(t *testing.T) {
|
||||
{
|
||||
description: "construct secret from file",
|
||||
input: types.SecretArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "fileSecret"},
|
||||
DataSources: types.DataSources{
|
||||
FileSources: []string{"secret/app-init.ini"},
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "fileSecret",
|
||||
DataSources: types.DataSources{
|
||||
FileSources: []string{"secret/app-init.ini"},
|
||||
},
|
||||
},
|
||||
},
|
||||
options: nil,
|
||||
@@ -115,9 +119,11 @@ func TestConstructSecret(t *testing.T) {
|
||||
{
|
||||
description: "construct secret from literal",
|
||||
input: types.SecretArgs{
|
||||
GeneratorArgs: types.GeneratorArgs{Name: "literalSecret"},
|
||||
DataSources: types.DataSources{
|
||||
LiteralSources: []string{"a=x", "b=y"},
|
||||
GeneratorArgs: types.GeneratorArgs{
|
||||
Name: "literalSecret",
|
||||
DataSources: types.DataSources{
|
||||
LiteralSources: []string{"a=x", "b=y"},
|
||||
},
|
||||
},
|
||||
},
|
||||
options: &types.GeneratorOptions{
|
||||
|
||||
Reference in New Issue
Block a user