From be1dcd08ddfbd8048f58ed12bb334e78dbe8c1cb Mon Sep 17 00:00:00 2001 From: Chelsea Holland Komlo Date: Mon, 25 Sep 2017 19:40:11 +0000 Subject: [PATCH] fixups from code review --- command/acl_token_update_test.go | 8 ++------ website/source/docs/commands/acl/token-update.html.md.erb | 6 +++--- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/command/acl_token_update_test.go b/command/acl_token_update_test.go index a07345bda..d1832ed37 100644 --- a/command/acl_token_update_test.go +++ b/command/acl_token_update_test.go @@ -1,7 +1,6 @@ package command import ( - "os" "testing" "github.com/hashicorp/nomad/acl" @@ -38,14 +37,11 @@ func TestACLTokenUpdateCommand(t *testing.T) { // Request to update a new token without providing a valid management token invalidToken := mock.ACLToken() - os.Setenv("NOMAD_TOKEN", invalidToken.SecretID) - code := cmd.Run([]string{"-address=" + url, "-name=bar", mockToken.AccessorID}) - //code := cmd.Run([]string{"-address=" + url, "-policy=foo", "-type=client"}) + code := cmd.Run([]string{"--token=" + invalidToken.SecretID, "-address=" + url, "-name=bar", mockToken.AccessorID}) assert.Equal(1, code) // Request to update a new token with a valid management token - os.Setenv("NOMAD_TOKEN", token.SecretID) - code = cmd.Run([]string{"-address=" + url, "-name=bar", mockToken.AccessorID}) + code = cmd.Run([]string{"--token=" + token.SecretID, "-address=" + url, "-name=bar", mockToken.AccessorID}) assert.Equal(0, code) // Check the output diff --git a/website/source/docs/commands/acl/token-update.html.md.erb b/website/source/docs/commands/acl/token-update.html.md.erb index f786d1665..c1d18737f 100644 --- a/website/source/docs/commands/acl/token-update.html.md.erb +++ b/website/source/docs/commands/acl/token-update.html.md.erb @@ -1,9 +1,9 @@ --- layout: "docs" -page_title: "Commands: acl token create" -sidebar_current: "docs-commands-acl-token-create" +page_title: "Commands: acl token update" +sidebar_current: "docs-commands-acl-token-update" description: > - The token create command is used to update existing ACL tokens. + The token update command is used to update existing ACL tokens. --- # Command: acl token update