Skip to content

Testing Regula advanced rules? #277

@christophetd

Description

@christophetd

Hello,

Is it possible to use fregot test to run unit tests of Regula advanced rules making use of fugue.resources, fugue.deny_resource and similar functions?

So far, simply running fregot test raises errors because it's not aware of the definition of these functions:

$ frego test rules/aws_s3_bucket_public_access_block.rego
 "rules/aws_s3_bucket_public_access_block.rego" (line 12, column 11):
  unknown call:

    12| buckets = fugue.resources("AWS.S3.Bucket")
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  Unknown call to fugue.resources

...

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions