cli: check previously ignored errors when updating a policy (#6565)

This commit is contained in:
Lars Lehtonen 2020-02-03 01:14:30 -08:00 committed by GitHub
parent b33cf06cf7
commit da9086cd03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -102,7 +102,10 @@ func (c *cmd) Run(args []string) int {
}
rules, err := helpers.LoadDataSource(c.rules, c.testStdin)
if err != nil {
c.UI.Error(fmt.Sprintf("Error loading data source: %v", err))
return 1
}
var updated *api.ACLPolicy
if c.noMerge {
updated = &api.ACLPolicy{

View File

@ -30,6 +30,7 @@ func TestConfigDelete(t *testing.T) {
Name: "web",
Protocol: "tcp",
}, nil)
require.NoError(t, err)
args := []string{
"-http-addr=" + a.HTTPAddr(),

View File

@ -30,6 +30,7 @@ func TestConfigRead(t *testing.T) {
Name: "web",
Protocol: "tcp",
}, nil)
require.NoError(t, err)
args := []string{
"-http-addr=" + a.HTTPAddr(),