Fix failing policy-write integration test

This was a flawed test. Previously the test passed in a fixture that
corresponded to a CLI config file, not an actual policy. The test
_should_ have been failing, but it wasn't. This commit adds a new
fixture.
This commit is contained in:
Seth Vargo 2016-03-10 15:45:49 -05:00
parent ad7049eed1
commit 6739804118
2 changed files with 4 additions and 1 deletions

View File

@ -3,6 +3,7 @@ package command
import (
"fmt"
"io/ioutil"
"log"
"os"
"github.com/hashicorp/go-multierror"
@ -67,6 +68,8 @@ func ParseConfig(contents string) (*Config, error) {
return nil, fmt.Errorf("Failed to parse config: does not contain a root object")
}
log.Println(fmt.Sprintf("%#v", list))
valid := []string{
"token_helper",
}

View File

@ -24,7 +24,7 @@ func TestPolicyWrite(t *testing.T) {
args := []string{
"-address", addr,
"foo",
"./test-fixtures/config.hcl",
"./test-fixtures/policy.hcl",
}
if code := c.Run(args); code != 0 {
t.Fatalf("bad: %d\n\n%s", code, ui.ErrorWriter.String())