Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 491FF200C19 for ; Sun, 12 Feb 2017 18:48:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 47D3A160B6B; Sun, 12 Feb 2017 17:48:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 936E1160B51 for ; Sun, 12 Feb 2017 18:47:59 +0100 (CET) Received: (qmail 93861 invoked by uid 500); 12 Feb 2017 17:47:58 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 93850 invoked by uid 99); 12 Feb 2017 17:47:58 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2017 17:47:58 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1CBC71A06CF for ; Sun, 12 Feb 2017 17:47:58 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -4.768 X-Spam-Level: X-Spam-Status: No, score=-4.768 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-2.999] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id HZjPEYIBNWxn for ; Sun, 12 Feb 2017 17:47:56 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with SMTP id 5A6955F54F for ; Sun, 12 Feb 2017 17:47:56 +0000 (UTC) Received: (qmail 93474 invoked by uid 99); 12 Feb 2017 17:47:40 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 12 Feb 2017 17:47:40 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id B72C11CC3E0; Sun, 12 Feb 2017 17:47:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============3605838941281148292==" MIME-Version: 1.0 Subject: Re: Review Request 56463: ATLAS-1539 Attempt to load policy store and user credential files as classloader resource if configured file path does not exist, in the same manner that the atlas-application.properties is located. From: David Kantor To: David Kantor , Apoorv Naik , atlas , Jeff Hagelberg Date: Sun, 12 Feb 2017 17:47:39 -0000 Message-ID: <20170212174739.13057.95461@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: David Kantor X-ReviewGroup: atlas X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/56463/ X-Sender: David Kantor References: <20170212174140.13056.28891@reviews.apache.org> In-Reply-To: <20170212174140.13056.28891@reviews.apache.org> X-ReviewBoard-Diff-For: typesystem/src/test/resources/users-credentials.properties X-ReviewBoard-Diff-For: typesystem/src/test/resources/policy-store.txt Reply-To: David Kantor X-ReviewRequest-Repository: atlas archived-at: Sun, 12 Feb 2017 17:48:00 -0000 --===============3605838941281148292== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/56463/ ----------------------------------------------------------- (Updated Feb. 12, 2017, 5:47 p.m.) Review request for atlas. Changes ------- Remove whitespace Bugs: ATLAS-1539 https://issues.apache.org/jira/browse/ATLAS-1539 Repository: atlas Description ------- Integration tests in projects which use the typesystem test jar (e.g. webapp) were failing when the tests were invoked in the project directory rather than the top level project, because properties for user-credentials.properties and policy store files where using a path relative to the working directory, which amounted to a hard-coded assumption that the tests would only ever be run from the top level. Fix: Attempt to load policy store and user credential files as classloader resource if configured file path does not exist, in the same manner that the atlas-application.properties is located. Use test copies of these files in the typesystem src/test/resources rather than a path relative the top level maven project. Diffs (updated) ----- authorization/src/main/java/org/apache/atlas/authorize/simple/FileReaderUtil.java 36db7007a14c2afbda7582409e5dfa474fa9a7b6 authorization/src/main/java/org/apache/atlas/authorize/simple/PolicyUtil.java 4f9255a3dee5ac59dcef95e76eae423445be6bdd authorization/src/main/java/org/apache/atlas/authorize/simple/SimpleAtlasAuthorizer.java d6e785366a5fd4dc60496d37b2639ebafa06d087 common/src/main/java/org/apache/atlas/ApplicationProperties.java 9b1e9cd48a52da1cc388a808a67817e41741209d typesystem/src/test/resources/atlas-application.properties 0e6bc4187ad064820d11da137cee3b8b1857560e typesystem/src/test/resources/policy-store.txt PRE-CREATION typesystem/src/test/resources/users-credentials.properties PRE-CREATION webapp/src/main/java/org/apache/atlas/web/dao/UserDao.java 254d836e5389780b6d10a8d1a664a96b06ad8d1b Diff: https://reviews.apache.org/r/56463/diff/ Testing ------- Ran all unit and integration tests with no regressions. Thanks, David Kantor --===============3605838941281148292==--