test suites don't support `version` for resource p...
# help
j
test suites don't support
version
for resource policies?
i have a resource policy with
version: 'production'
how do i write a test suite against it? under:
Copy code
resources:
  attack_patterns_resource:
    id: sample_id_123
    kind: attack_patterns
  automatecatalog_resource:
    id: sample_id_456
    kind: automatecatalog
i am not allowed to specify
version: "production"
as i will get an error of i do so:
failed to load test suite: failed to unmarshal JSON: proto: (line 1:462): unknown field "version"
if i leave
version: "production"
in my resource policy, then all my test suites will fail. but if i change it to
version: "default"
then my test suites will pass successfully
c
The field is called
policyVersion
.
j
Aaah ok. Thank you
c
Thanks for raising it. I think we've forgotten to document that.
j
Can policyVersion take a wildcard?
This means I can have a set of test suites for any version of my policies.
Or is it better practice to have a set of test suites for each set of policies?
From the way this is designed it looks like there's one set of test suites for one set of policies.