From 47979c42342c3ba071deb6a13546da70d52da19a Mon Sep 17 00:00:00 2001 From: Alex Dadgar Date: Fri, 27 May 2016 17:15:25 -0700 Subject: [PATCH] Revert "validate that tasks don't contain slashes" This reverts commit b3025782d0030a2799242deab95d26b9dd72dcdd. --- nomad/structs/structs.go | 3 --- nomad/structs/structs_test.go | 7 ------- 2 files changed, 10 deletions(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index 761b3d88d..64039cf51 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -1741,9 +1741,6 @@ func (t *Task) Validate() error { if t.Name == "" { mErr.Errors = append(mErr.Errors, errors.New("Missing task name")) } - if strings.ContainsAny(t.Name, `/\`) { - mErr.Errors = append(mErr.Errors, errors.New("Task name can not include slashes")) - } if t.Driver == "" { mErr.Errors = append(mErr.Errors, errors.New("Missing task driver")) } diff --git a/nomad/structs/structs_test.go b/nomad/structs/structs_test.go index e60ceadcf..01b828ae8 100644 --- a/nomad/structs/structs_test.go +++ b/nomad/structs/structs_test.go @@ -258,13 +258,6 @@ func TestTask_Validate(t *testing.T) { t.Fatalf("err: %s", err) } - task = &Task{Name: "web/foo"} - err = task.Validate() - mErr = err.(*multierror.Error) - if !strings.Contains(mErr.Errors[0].Error(), "slashes") { - t.Fatalf("err: %s", err) - } - task = &Task{ Name: "web", Driver: "docker",