Class AclClassMetadataTest

java.lang.Object
ubic.gemma.core.util.test.BaseTest5
ubic.gemma.core.security.authorization.acl.AclClassMetadataTest

@ContextConfiguration public class AclClassMetadataTest extends BaseTest5
  • Constructor Details

    • AclClassMetadataTest

      public AclClassMetadataTest()
  • Method Details

    • test

      @Test public void test()
    • testNoTwoSecuredChildrenShareAnOwnerQuery

      @Test public void testNoTwoSecuredChildrenShareAnOwnerQuery()
      No two secured children may resolve their owner through the same query.

      Each query names the child's own association, so an identical string across two classes means one of them is asking about the other's entity. That is not hypothetical: ExpressionExperimentSubSet, MeanVarianceRelation and ExperimentalDesign were registered with ExpressionAnalysisResultSet's query — one copy-paste down three consecutive lines — and nothing failed, because these queries feed a consistency linter that treats an empty result as agreement. Run against the wrong table they returned nothing for every input, so the linter passed all three without checking them.

      Asserting the exact strings would catch it too, but only as a change detector. This asserts the property that was actually violated, so it holds for registrations nobody has written yet.

    • testTheThreeFormerlyCopyPastedRegistrations

      @Test public void testTheThreeFormerlyCopyPastedRegistrations()
      The three that carried the wrong query, pinned explicitly: a subset names its source experiment, while the design and the mean-variance relation are named BY the experiment.