mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Docker labels configuration should be of type "array" in schema
This commit is contained in:
@@ -176,7 +176,7 @@ func (d *DockerDriver) Validate(config map[string]interface{}) error {
|
||||
Type: fields.TypeString,
|
||||
},
|
||||
"labels": &fields.FieldSchema{
|
||||
Type: fields.TypeMap,
|
||||
Type: fields.TypeArray,
|
||||
},
|
||||
"auth": &fields.FieldSchema{
|
||||
Type: fields.TypeArray,
|
||||
|
||||
@@ -91,6 +91,11 @@ func TestParse(t *testing.T) {
|
||||
User: "bob",
|
||||
Config: map[string]interface{}{
|
||||
"image": "hashicorp/binstore",
|
||||
"labels": []map[string]interface{}{
|
||||
map[string]interface{}{
|
||||
"FOO": "bar",
|
||||
},
|
||||
},
|
||||
},
|
||||
Services: []*structs.Service{
|
||||
{
|
||||
|
||||
@@ -47,6 +47,10 @@ job "binstore-storagelocker" {
|
||||
|
||||
config {
|
||||
image = "hashicorp/binstore"
|
||||
|
||||
labels {
|
||||
FOO = "bar"
|
||||
}
|
||||
}
|
||||
|
||||
logs {
|
||||
|
||||
Reference in New Issue
Block a user