Exemplo n.º 1
0
        public virtual void TestCustom()
        {
            Configuration conf = new Configuration(false);

            foreach (KMSACLs.Type type in KMSACLs.Type.Values())
            {
                conf.Set(type.GetAclConfigKey(), type.ToString() + " ");
            }
            KMSACLs acls = new KMSACLs(conf);

            foreach (KMSACLs.Type type_1 in KMSACLs.Type.Values())
            {
                Assert.True(acls.HasAccess(type_1, UserGroupInformation.CreateRemoteUser
                                               (type_1.ToString())));
                NUnit.Framework.Assert.IsFalse(acls.HasAccess(type_1, UserGroupInformation.CreateRemoteUser
                                                                  ("foo")));
            }
        }
Exemplo n.º 2
0
        public virtual void TestDefaults()
        {
            KMSACLs acls = new KMSACLs(new Configuration(false));

            foreach (KMSACLs.Type type in KMSACLs.Type.Values())
            {
                Assert.True(acls.HasAccess(type, UserGroupInformation.CreateRemoteUser
                                               ("foo")));
            }
        }