mirror of
https://github.com/docker/compose.git
synced 2026-08-27 03:45:29 +00:00
Add EnvVars property to the container proto and update unittest
Signed-off-by: aiordache <anca.iordache@docker.com>
This commit is contained in:
parent
abd6af6386
commit
11d4db6907
4 changed files with 112 additions and 98 deletions
|
|
@ -160,5 +160,6 @@ func grpcContainerToContainerConfig(request *containersv1.RunRequest) containers
|
|||
MemLimit: formatter.MemBytes(request.GetMemoryLimit()),
|
||||
CPULimit: float64(request.GetCpuLimit()),
|
||||
RestartPolicyCondition: request.RestartPolicyCondition,
|
||||
Environment: request.EnvVars,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ func TestGrpcContainerToContainerConfig(t *testing.T) {
|
|||
},
|
||||
MemoryLimit: 41,
|
||||
CpuLimit: 42,
|
||||
EnvVars: []string{"PROTOVAR=VALUE"},
|
||||
}
|
||||
|
||||
cc := grpcContainerToContainerConfig(r)
|
||||
|
|
@ -65,4 +66,5 @@ func TestGrpcContainerToContainerConfig(t *testing.T) {
|
|||
assert.DeepEqual(t, cc.Labels, map[string]string{
|
||||
"mykey": "mylabel",
|
||||
})
|
||||
assert.DeepEqual(t, cc.Environment, []string{"PROTOVAR=VALUE"})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue