1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2025-03-05 23:46:56 +00:00
kyverno/pkg/engine
vivek kumar sahu ae6f6c327f Added Code to support the test command for mutate policy (#2279)
* Added test-e2e-local in the Makefile
* Added a proper Indentation
* Added 3 more fields
* Added getPolicyResourceFullPath function
* Updating the patchedResource path to full path
* Converts Namespaced policy to ClusterPolicy
* Added GetPatchedResourceFromPath function
* Added GetPatchedResource function
* Checks for namespaced-policy from policy name provided bu user
* Generalizing resultKey for both validate and mutate. Also added kind field to this key
* Added Type field to PolicySpec
* To handle mutate case when resource and patchedResource are equal
* fetch patchResource from path provided by user and compare it with engine patchedResource
* generating result by comparing patchedResource
* Added kind to resultKey
* Handles namespaced policy results
* Skip is required
* Added []*response.EngineResponse return type in ApplyPolicyOnResource function
* namespaced policy only surpasses resources having same namespace as policy
* apply command will print the patchedResource whereas test will not
* passing engineResponse instead of validateEngineResponse because it supports results for both validate and mutate case
* default namespace will printed in the output table if no namespace is being provided by the user
* Added e2e test for mutate policy and also examples for both type of policies
* Created a separate function to get resultKey
* Changes in the resultKey for validate case
* Added help description for test command in the cli
* fixes code for more test cases
* fixes code to support more cases and also added resources for e2e-test
* some small changes like adding brackets, clubbing 2 if cond into one, changing variable name, etc.
* Rearrange GetPatchedResourceFromPath function to get rid from repetion of same thing twice.
* Added kind in the result section of test.yaml for all test-cases
* engineResponse will handle different types of response
* GetPatchedResource() uses GetResource function to fetch patched resource

Signed-off-by: viveksahu26 <vivekkumarsahu650@gmail.com>
2021-10-05 11:11:54 +05:30
..
anchor Implement global anchor (#2311) 2021-09-13 08:59:28 -07:00
common Implement global anchor (#2311) 2021-09-13 08:59:28 -07:00
context add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00
jmespath JMESPath: Arithmetic Operators (#2416) 2021-09-22 14:40:45 -07:00
json-utils Substitute vars in map keys (#2344) 2021-09-10 14:08:47 -07:00
mutate Implement global anchor (#2311) 2021-09-13 08:59:28 -07:00
operator fix gofmt and golint issues (#667) 2020-02-03 13:38:24 -08:00
response Feature/cosign (#2078) 2021-07-09 18:01:46 -07:00
utils fmt and improve error messages 2021-07-20 20:28:11 -07:00
validate removing commented test case 2021-09-29 11:02:07 +05:30
variables Escape references (#2433) 2021-09-27 11:44:56 -07:00
wildcards updating minio verison (#1956) 2021-06-09 19:16:26 -07:00
apiPath.go Set Version to Group/Version for /apis/* URLs 2021-03-06 00:22:12 -05:00
apiPath_test.go Add unit test 2021-03-08 22:56:14 -05:00
forceMutate.go Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
forceMutate_test.go Patch strategic merge preprocessing: implement anchor handling (#2156) 2021-07-23 10:53:37 -07:00
generation.go Added Code to support the test command for mutate policy (#2279) 2021-10-05 11:11:54 +05:30
imageVerify.go remove minio/minio and update minio/pkg (#2440) 2021-09-28 12:19:26 -07:00
jsonContext.go Block scalars for value files (#2380) 2021-09-13 16:33:30 +05:30
jsonContext_test.go feat: added functionality for delimiting multi-line block by newline characters 2021-03-01 00:46:50 +05:30
mutation.go Added Code to support the test command for mutate policy (#2279) 2021-10-05 11:11:54 +05:30
mutation_test.go Add test case for non zero index patches with patchesJson6902 (#2339) 2021-09-01 17:50:37 -07:00
policyContext.go namespace selector (#1532) 2021-02-03 13:09:42 -08:00
utils.go Added Code to support the test command for mutate policy (#2279) 2021-10-05 11:11:54 +05:30
utils_test.go Added Code to support the test command for mutate policy (#2279) 2021-10-05 11:11:54 +05:30
validation.go Added Code to support the test command for mutate policy (#2279) 2021-10-05 11:11:54 +05:30
validation_test.go add special variable substitution logic for preconditions (#1930) 2021-07-28 09:54:50 -07:00