mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Add support for binary file in configmap
This commit is contained in:
committed by
Davanum Srinivas
parent
5f6e12793b
commit
7e158fb4f6
@@ -62,6 +62,38 @@ func TestMakePayload(t *testing.T) {
|
||||
},
|
||||
success: true,
|
||||
},
|
||||
{
|
||||
name: "no overrides binary data",
|
||||
configMap: &v1.ConfigMap{
|
||||
BinaryData: map[string][]byte{
|
||||
"foo": []byte("foo"),
|
||||
"bar": []byte("bar"),
|
||||
},
|
||||
},
|
||||
mode: 0644,
|
||||
payload: map[string]util.FileProjection{
|
||||
"foo": {Data: []byte("foo"), Mode: 0644},
|
||||
"bar": {Data: []byte("bar"), Mode: 0644},
|
||||
},
|
||||
success: true,
|
||||
},
|
||||
{
|
||||
name: "no overrides mixed data",
|
||||
configMap: &v1.ConfigMap{
|
||||
BinaryData: map[string][]byte{
|
||||
"foo": []byte("foo"),
|
||||
},
|
||||
Data: map[string]string{
|
||||
"bar": "bar",
|
||||
},
|
||||
},
|
||||
mode: 0644,
|
||||
payload: map[string]util.FileProjection{
|
||||
"foo": {Data: []byte("foo"), Mode: 0644},
|
||||
"bar": {Data: []byte("bar"), Mode: 0644},
|
||||
},
|
||||
success: true,
|
||||
},
|
||||
{
|
||||
name: "basic 1",
|
||||
mappings: []v1.KeyToPath{
|
||||
|
||||
Reference in New Issue
Block a user