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:
parent
ad7049eed1
commit
6739804118
|
@ -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",
|
||||
}
|
||||
|
|
|
@ -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())
|
||||
|
|
Loading…
Reference in New Issue