client/driver/env: fix optional meta test

This commit is contained in:
Nick Ethier 2018-06-11 12:29:13 -04:00
parent c65882cafd
commit 3aa6241b5c
No known key found for this signature in database
GPG Key ID: 07C1A3ECED90D24A
1 changed files with 1 additions and 0 deletions

View File

@ -382,6 +382,7 @@ func TestEnvironment_InterpolateEmptyOptionalMeta(t *testing.T) {
a.Job.ParameterizedJob = &structs.ParameterizedJobConfig{ a.Job.ParameterizedJob = &structs.ParameterizedJobConfig{
MetaOptional: []string{"metaopt1", "metaopt2"}, MetaOptional: []string{"metaopt1", "metaopt2"},
} }
a.Job.Dispatched = true
task := a.Job.TaskGroups[0].Tasks[0] task := a.Job.TaskGroups[0].Tasks[0]
task.Meta = map[string]string{"metaopt1": "metaopt1val"} task.Meta = map[string]string{"metaopt1": "metaopt1val"}
env := NewBuilder(mock.Node(), a, task, "global").Build() env := NewBuilder(mock.Node(), a, task, "global").Build()