db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Myrna van Lunteren (JIRA)" <j...@apache.org>
Subject [jira] Updated: (DERBY-3659) revive tests with ldap references to be runnable as junit tests
Date Tue, 27 May 2008 23:41:45 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3659?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Myrna van Lunteren updated DERBY-3659:
--------------------------------------

    Attachment: DERBY-3659_2.diff

attaching a patch with 2 'new' tests, LDAPAuthenticationTest and InvalidLDAPServerAuthenticationTest.

LDAPAuthenticationTest essentially tests what was contributed with master file 'secureUsersldap.out'.
It was never made into a test because there was no ldap server. This test will need to be
run with 5 properties passed in; derbyTesting.ldapServer, derbyTesting.dnString, derbyTesting.ldapUser,
derbyTesting.ldapPassword, and derbyTesting.ldapPort.
There should be 2 users on the ldap server, with ou=People;
mamta / yeehaLdap and kathy/kathyS.

InvalidLDAPServerAuthenticationTest tests that an appropriate 08004 error is returned when
the ldapServer used does not exist. It's a somewhat silly test, and only works without security
manager (else, I got 
security manager errors even though I had added the non-existing ldapServer to the policy
files).

I ran into one strange thing with these test:

1.  re LDAPAuthenticationTest: the sql executed in ij as reflected in the secureUsersldap.out
file resulted in a 08004 error when an invalid user attempted to shutdown the system.
-----------
ij> -- Derby system shutdown - check user - should fail
connect ';user=jamie;password=LetMeIn;shutdown=true';
ERROR 08004: Connection refused : Invalid authentication.
-----------
However, when I attempted a similar construction in junit, connecting either with DataSources
or DriverManager, I was able to successfully shutdown the system; at least, I got the XJ015
error (system shutdown). Anyone any suggestions on this?

2. InvalidLDAPAuthenticationServerTest will result in an unusable database, and I tried to
make it so the test would cleanup fine. However, the test does not cleanly delete db.lck,
yet I don't see what is causing the test (framework?) to hang on to it. If anyone sees what
I'm missing?


> revive tests with ldap references to be runnable as junit tests
> ---------------------------------------------------------------
>
>                 Key: DERBY-3659
>                 URL: https://issues.apache.org/jira/browse/DERBY-3659
>             Project: Derby
>          Issue Type: Test
>          Components: Test
>            Reporter: Myrna van Lunteren
>            Assignee: Myrna van Lunteren
>            Priority: Minor
>         Attachments: DERBY-3659.diff, DERBY-3659_2.diff
>
>
> During initial contribution some tests were created with references to ldap security
mechanism.
> However, because we don't have ourselves setup for a public ldap server, these tests
have fallen by the wayside.
> Specifically, there is still a secureUsers .out file in functionTests.master that uses
some ldap references, and there's the -not running - jdbcapi.xaJNDI.java.
> These should be turned into junit tests out of these that take properties for the ldapserver,
port, and dnString.
> If we ever get a Zone, with an ldap server, or somehow get access to another public ldap
server, then we can modify the tests to have the correct references.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message