Class VerifyPublicationEvidenceCliTest


@ContextConfiguration public class VerifyPublicationEvidenceCliTest extends BaseCliTest5
The two rules that must not regress: the command refuses to run without being told which half to run, and a curator's assertion is never written over.
  • Constructor Details

    • VerifyPublicationEvidenceCliTest

      public VerifyPublicationEvidenceCliTest()
  • Method Details

    • testItRefusesToRunWithoutBeingToldWhichHalf

      @Test @WithMockUser public void testItRefusesToRunWithoutBeingToldWhichHalf()
      🛑 There is no default mode, deliberately. One half reads GEO and restates a basis; the other creates publication links that a live Gemma 1.32.x displays the moment they are written. A default would make the second one reachable by someone who meant the first.
    • testACuratorsAssertionIsNotWrittenOver

      @Test @WithMockUser public void testACuratorsAssertionIsNotWrittenOver() throws Exception
      A curator outranks GEO, and apply() declines such a write in silence — so a run that reports what it changed must not attempt one and assume it landed. The held assertion is read first and a curator-held row is left alone.
      Throws:
      Exception
    • testABadChangeLogPathIsRefusedBeforeAnythingIsLoaded

      @Test @WithMockUser public void testABadChangeLogPathIsRefusedBeforeAnythingIsLoaded()
      🛑 Refused while it is still an argument. The change log is opened after the experiment list is built, and building it loads the corpus — so a bad path used to cost a full scan (25,687 datasets on prod) before failing, and failed as a NoSuchFileException naming the FILE when the missing thing was its DIRECTORY. Reported from a real run 2026-08-18.

      What this pins is the failure and its message. That it happens before the corpus loads is a consequence of the check living in processExperimentOptions, which runs during argument parsing — asserting it here through mock interactions is not possible, because the beans in this context are shared across tests and carry the other tests' calls.

    • testAPaperGeoListsSecondIsReportedNotCertified

      @Test @WithMockUser public void testAPaperGeoListsSecondIsReportedNotCertified() throws Exception
      🛑 GEO listing several papers is not GEO disagreeing.

      GSE934 lists 15802019 and 15867358 — two 2005 papers from the same lab — and Gemma holds the second. That is not a disagreement: GEO does link the paper to the series. Nor is it agreement on the primary. It gets its own outcome and no write.

      Throws:
      Exception
    • testAPaperGeoDoesNotListAtAllIsNotWritten

      @Test @WithMockUser public void testAPaperGeoDoesNotListAtAllIsNotWritten() throws Exception
      A paper GEO does not link to the series at all IS the disagreement, and nothing is written for it: it splits into "a curator corrected GEO" and "GEO is wrong", which no rule separates.
      Throws:
      Exception