Beispiel #1
0
        public async Task DeleteSecret_ThatExists_Success()
        {
            string  roleName_A = _uniqueKeys.GetKey("RDel");
            AppRole roleA      = new AppRole(roleName_A);

            Assert.True(await _appRoleAuthEngine.SaveRole(roleA), "A1: Saving the role failed.");

            // Now create the a secret
            AppRoleSecret secret_A = await _appRoleAuthEngine.GenerateSecretID(roleA.Name);

            Assert.True(await _appRoleAuthEngine.DeleteSecretID(roleA.Name, secret_A.ID), "A2: Deleting the secret failed");
            Assert.IsNull(await _appRoleAuthEngine.ReadSecretID(roleA.Name, secret_A.ID), "A3: Expected to not find the given secret.  But instead was returned a secret.  Delete did not work?");
        }