Trog-Routes-HTML-series-lifecycle-sqlite.t 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env perl
  2. # The whole lifecycle suite again, against the SQLite data model.
  3. #
  4. # A data model is only finished when the application cannot tell which one it is
  5. # talking to, and every assertion in that file is about what the app does rather
  6. # than about how anything is stored -- so all of them have to hold for any model.
  7. # Run as a separate process because the model is chosen once, from config, at
  8. # the point Trog::Data builds it.
  9. use 5.040;
  10. use re '/aasx';
  11. use warnings FATAL => 'all';
  12. use Test::More;
  13. use IPC::Run3();
  14. use FindBin;
  15. my $suite = "$FindBin::Bin/Trog-Routes-HTML-series-lifecycle.t";
  16. ok( -e $suite, 'the lifecycle suite is there to run' ) or BAIL_OUT("Can't find $suite");
  17. # Captured rather than inherited: the child speaks TAP too, and two test streams
  18. # down one pipe is not a test result, it is a parse error.
  19. my $output = q{};
  20. my $rc = do {
  21. local $ENV{TCMS_TEST_DATA_MODEL} = 'SQLite';
  22. IPC::Run3::run3( [ $^X, "-I$FindBin::Bin/../lib", $suite ], \undef, \$output, \$output );
  23. $?;
  24. };
  25. is( $rc, 0, 'the whole lifecycle passes on the SQLite data model' ) or diag($output);
  26. done_testing();