Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaElastic committed Aug 15, 2023
1 parent 9955d52 commit 0bdf5ca
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 0 additions & 1 deletion internal/pkg/policy/parsed_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ func NewParsedPolicy(ctx context.Context, bulker bulk.Bulk, p model.Policy) (*Pa
if err != nil {
return nil, err
}
fields["secret_references"] = nil

// We are cool and the gang
pp := &ParsedPolicy{
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/policy/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ func getPolicyInputsWithSecrets(ctx context.Context, fields map[string]json.RawM
}
result = append(result, newInput)
}
delete(fields, "secret_references")
return result, nil
}

Expand Down
3 changes: 3 additions & 0 deletions internal/pkg/policy/secret_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ func TestGetPolicyInputsWithSecretsAndStreams(t *testing.T) {
result, _ := getPolicyInputsWithSecrets(context.TODO(), fields, bulker)

assert.Equal(t, expectedResult, result)
var refs any
json.Unmarshal(fields["secret_references"], &refs)
assert.Equal(t, nil, refs)
}

func TestGetPolicyInputsNoopWhenNoSecrets(t *testing.T) {
Expand Down

0 comments on commit 0bdf5ca

Please sign in to comment.