[
https://issues.apache.org/jira/browse/RANGER-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17616058#comment-17616058
]
Madhan Neethiraj commented on RANGER-3888:
------------------------------------------
[~dineshkumar-yadav] - can you please review following unit test failures in
master branch? Thanks!
{noformat}
[ERROR] Failures:
[ERROR]
TestPolicyEngine.testValiditySchedulerApplicable:862->runValiditySchedulerTests:908
Applicable every 31st of month starting at noon Zulu for 1 day, starting from
1/1/18
[ERROR]
TestPolicyEngine.testValiditySchedulerInvalid:848->runValiditySchedulerTests:910
Overlapping ranges, incorrect range, invalid field value in validity-schedule,
[[ Validation failure: error code[0], reason[incorrect range], field[hour],
subfield[], type[semantically incorrect], Validation failure: error code[0],
reason[overlapping range value], field[hour], subfield[], type[semantically
incorrect], Validation failure: error code[0], reason[incorrect value],
field[dayOfWeek], subfield[], type[semantically incorrect], Validation
failure: error code[0], reason[incorrect value], field[month], subfield[],
type[semantically incorrect]]]
[ERROR]
TestPolicyEngine.testValiditySchedulerValid:855->runValiditySchedulerTests:908
dayOfWeek blank and dayOfMonth not blank
[INFO]
[ERROR] Tests run: 226, Failures: 3, Errors: 0, Skipped: 0
{noformat}
> Validity Scheduler , recurrence schedule: When there is no interval but
> schedule is specified , policy is created
> -----------------------------------------------------------------------------------------------------------------
>
> Key: RANGER-3888
> URL: https://issues.apache.org/jira/browse/RANGER-3888
> Project: Ranger
> Issue Type: Bug
> Components: Ranger
> Reporter: Sharmadha S
> Assignee: Dineshkumar Yadav
> Priority: Major
> Fix For: 3.0.0
>
>
> In the following policy payload , there is no recurrence interval but
> schedule is present . Expected is 400 but request succeeds and policy is
> created.
> {code:java}
> {
> "end-one-entity-classification":null,
> "name":"test_validity_scheduler",
> "service":"cm_atlas",
> "isAuditEnabled":true,
> "zoneName":"",
> "end-two-entity-classification":null,
> "isDenyAllElse":false,
> "end-two-entity-type":null,
> "validitySchedules":[
> {
> "endTime":"2030/02/03 00:00:00",
> "recurrences":[
> {
> "interval":{
>
> },
> "schedule":{
> "dayOfWeek":"",
> "hour":"12",
> "month":"*",
> "year":"2020-2025",
> "minute":"15",
> "dayOfMonth":"1"
> }
> }
> ],
> "startTime":"2018/01/12 00:00:00"
> }
> ],
> "denyPolicyItems":[
> {
> "users":[
> "hrt_qa"
> ],
> "accesses":[
> {
> "isAllowed":true,
> "type":"entity-read"
> },
> {
> "isAllowed":true,
> "type":"entity-create"
> },
> {
> "isAllowed":true,
> "type":"entity-update"
> },
> {
> "isAllowed":true,
> "type":"entity-delete"
> }
> ]
> }
> ],
> "end-two-entity":null,
> "policyItems":[
>
> ],
> "end-one-entity-type":null,
> "policyLabels":[
>
> ],
> "type":null,
> "end-one-entity":null,
> "resources":{
> "entity":{
> "isExcludes":false,
> "values":[
> "*"
> ],
> "isRecursive":false
> },
> "entity-type":{
> "isExcludes":false,
> "values":[
> "hdfs_path"
> ],
> "isRecursive":false
> },
> "entity-classification":{
> "isExcludes":false,
> "values":[
> "*"
> ],
> "isRecursive":false
> }
> },
> "description":"cm_atlas"
> } {code}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)