[java-identity-provider COMMIT] /trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolve...

noreply at shibboleth.net noreply at shibboleth.net
Mon Oct 12 21:40:41 EDT 2015


Author: scantor
Date: Mon Oct 12 21:40:41 2015
New Revision: 7811

URL: http://svn.shibboleth.net/view/java-identity-provider?rev=7811&view=rev
Log:
IDP-829 - Remove test that no longer applies to new implementation.

Modified:
    trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/StoredIDDataConnectorTest.java

Modified: trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/StoredIDDataConnectorTest.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/StoredIDDataConnectorTest.java?rev=7811&r1=7810&r2=7811&view=diff
==============================================================================
--- trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/StoredIDDataConnectorTest.java	(original)
+++ trunk/idp-attribute-resolver-impl/src/test/java/net/shibboleth/idp/attribute/resolver/dc/impl/StoredIDDataConnectorTest.java	Mon Oct 12 21:40:41 2015
@@ -20,7 +20,6 @@
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.sql.SQLException;
-import java.sql.Timestamp;
 import java.util.List;
 
 import javax.sql.DataSource;
@@ -32,7 +31,6 @@
 import net.shibboleth.idp.attribute.resolver.context.AttributeResolutionContext;
 import net.shibboleth.idp.saml.attribute.resolver.impl.StoredIDDataConnector;
 import net.shibboleth.idp.saml.impl.TestSources;
-import net.shibboleth.idp.saml.nameid.PersistentIdEntry;
 import net.shibboleth.idp.testing.DatabaseTestingSupport;
 import net.shibboleth.utilities.java.support.component.ComponentInitializationException;
 import net.shibboleth.utilities.java.support.component.ComponentSupport;
@@ -256,48 +254,4 @@
         Assert.assertNull(context.getResolvedIdPAttributes().get(ComputedIDDataConnectorTest.OUTPUT_ATTRIBUTE_NAME));
     }
 
-    /**
-     * Test a marginal case where the persistentID already exists. We need to generate another one.
-     * 
-     * @throws ComponentInitializationException if badness happens
-     * @throws SQLException if badness happens
-     * @throws ResolutionException if badness happens
-     */
-    void previousEntry() throws ComponentInitializationException, IOException, ResolutionException, SQLException {
-        AttributeResolver resolver = constructResolver(1);
-        StoredIDDataConnector connector =
-                (StoredIDDataConnector) ComputedIDDataConnectorTest.connectorFromResolver(resolver);
-        DataSource source = DatabaseTestingSupport.GetMockDataSource(INIT_FILE, "StoredIDDataConnectorStorePrevious");
-        connector.setDataSource(source);
-        //
-        // Precharge the store with a duplicate persisent ID
-        //
-
-        connector.initialize();
-        ComponentSupport.initialize(resolver);
-        PersistentIdEntry idEntry = new PersistentIdEntry();
-        idEntry.setIssuerEntityId(TestSources.IDP_ENTITY_ID);
-        idEntry.setSourceId("wibble");
-        idEntry.setRecipientEntityId(TestSources.SP_ENTITY_ID + "2");
-        idEntry.setPrincipalName("princ");
-        idEntry.setPersistentId(ComputedIDDataConnectorTest.RESULT);
-        idEntry.setCreationTime(new Timestamp(System.currentTimeMillis()));
-
-        // TODO: need to decide if this should be public
-        // connector.getStoredIDStore().store(idEntry, source.getConnection());
-
-        AttributeResolutionContext context =
-                TestSources.createResolutionContext(TestSources.PRINCIPAL_ID, TestSources.IDP_ENTITY_ID,
-                        TestSources.SP_ENTITY_ID);
-        resolver.resolveAttributes(context);
-
-        // Now test that we got exactly what we expected
-        List<IdPAttributeValue<?>> resultValues =
-                context.getResolvedIdPAttributes().get(ComputedIDDataConnectorTest.OUTPUT_ATTRIBUTE_NAME).getValues();
-        Assert.assertEquals(resultValues.size(), 1);
-        String val = ((StringAttributeValue) resultValues.iterator().next()).getValue();
-        Assert.assertNotEquals(val, ComputedIDDataConnectorTest.RESULT);
-        assertIsUUID(val);
-
-    }
 }



More information about the commits mailing list