X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=test%2Fhints_test.cc;h=51374b274d74546faa5dc18e7f39f8ebda510c53;hb=59c4edb69ba926d3790198cd2b62dc601944a632;hp=263f02435a70a4a419718aea3209b93ec84ef6c7;hpb=4d5d4d96ef3314d3242807c4e610565b769414ee;p=dcpomatic.git diff --git a/test/hints_test.cc b/test/hints_test.cc index 263f02435..51374b274 100644 --- a/test/hints_test.cc +++ b/test/hints_test.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020-2021 Carl Hetherington + Copyright (C) 2020-2022 Carl Hetherington This file is part of DCP-o-matic. @@ -20,6 +20,7 @@ #include "lib/audio_content.h" +#include "lib/config.h" #include "lib/content.h" #include "lib/content_factory.h" #include "lib/cross.h" @@ -56,6 +57,8 @@ get_hints (shared_ptr film) { current_hints.clear (); Hints hints (film); + /* None of our tests need the audio analysis, and it is quite time-consuming */ + hints.disable_audio_analysis (); hints.Hint.connect (collect_hint); hints.start (); hints.join (); @@ -252,6 +255,24 @@ BOOST_AUTO_TEST_CASE (hints_audio_with_no_language) "Some of your content has audio but you have not set the audio language. It is advisable to set the audio language " "in the \"DCP\" tab unless your audio has no spoken parts." ); +} + + +BOOST_AUTO_TEST_CASE (hints_certificate_validity) +{ + ConfigRestorer cr; + + Config::instance()->set_signer_chain(make_shared(openssl_path(), 40 * 365)); + auto film = new_test_film2 ("hints_certificate_validity"); + auto hints = get_hints (film); + BOOST_REQUIRE_EQUAL (hints.size(), 1U); + BOOST_CHECK_EQUAL ( + hints[0], + "The certificate chain that DCP-o-matic uses for signing DCPs and KDMs has a validity period " + "that is too long. This will cause problems playing back DCPs on some systems. " + "You are advised to re-create the signing certificate chain by clicking the " + "\"Re-make certificates and key...\" button in the Keys page of Preferences." + ); }