fixups from code review

This commit is contained in:
Chelsea Holland Komlo
2017-09-25 19:40:11 +00:00
parent edf14142de
commit be1dcd08dd
2 changed files with 5 additions and 9 deletions

View File

@@ -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

View File

@@ -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