@@ -29,7 +29,7 @@
|
||||
#include <vamp_zero/health.hpp>
|
||||
#include <vamp_zero/portal.hpp>
|
||||
|
||||
#include "catalogue_fixture.hpp"
|
||||
#include "catalog_fixture.hpp"
|
||||
|
||||
|
||||
namespace {
|
||||
@@ -189,7 +189,7 @@ auto make_assets(vamp_zero::config const &config) -> void {
|
||||
name.front() = static_cast<std::char_t>(name.front() - 'A' + 'a');
|
||||
write_score(root / "practice" / "001" / (name + ".json"), std::string{part_name});
|
||||
}
|
||||
BOOST_REQUIRE(vamp_test::build_catalogue(root, config.database.path));
|
||||
BOOST_REQUIRE(vamp_test::build_catalog(root, config.database.path));
|
||||
}
|
||||
|
||||
auto run_once(std::filesystem::path const &root, vamp_zero::config const &config) -> std::expected<void, modulus::error> {
|
||||
@@ -336,7 +336,7 @@ BOOST_AUTO_TEST_CASE(portal_remote_commands_refresh_connection_without_backgroun
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(readiness_reads_packaged_catalogue_without_hardware_or_heartbeat) {
|
||||
BOOST_AUTO_TEST_CASE(readiness_reads_packaged_catalog_without_hardware_or_heartbeat) {
|
||||
auto root = temporary_directory{};
|
||||
auto config = fixture_config(root.path);
|
||||
make_assets(config);
|
||||
@@ -399,7 +399,7 @@ BOOST_AUTO_TEST_CASE(readiness_validates_generated_audio_using_configured_asset_
|
||||
auto score = boost::json::parse(read_file(path));
|
||||
score.as_object()["playback"] = boost::json::parse(read_file(fixture / "score.json")).at("playback");
|
||||
write_file(path, boost::json::serialize(score));
|
||||
BOOST_REQUIRE(vamp_test::build_catalogue(assets, config.database.path));
|
||||
BOOST_REQUIRE(vamp_test::build_catalog(assets, config.database.path));
|
||||
auto ready = run_once(root.path, config);
|
||||
BOOST_REQUIRE_MESSAGE(ready, (ready ? "" : ready.error().describe()));
|
||||
auto &sample = score.at("playback").at("samples").as_array().front().as_object();
|
||||
@@ -409,7 +409,7 @@ BOOST_AUTO_TEST_CASE(readiness_validates_generated_audio_using_configured_asset_
|
||||
sample["sha256"] = checksum(corrupt);
|
||||
write_file(audio, corrupt);
|
||||
write_file(path, boost::json::serialize(score));
|
||||
BOOST_REQUIRE(vamp_test::build_catalogue(assets, config.database.path));
|
||||
BOOST_REQUIRE(vamp_test::build_catalog(assets, config.database.path));
|
||||
ready = run_once(root.path, config);
|
||||
BOOST_REQUIRE(!ready);
|
||||
BOOST_TEST(std::string{ready.error().message()}.find("PCM16 WAV") != std::string::npos);
|
||||
@@ -437,7 +437,7 @@ BOOST_AUTO_TEST_CASE(readiness_rejects_corrupt_checksums_and_escaping_pages) {
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(readiness_rejects_missing_or_malformed_catalogues) {
|
||||
BOOST_AUTO_TEST_CASE(readiness_rejects_missing_or_malformed_catalogs) {
|
||||
auto root = temporary_directory{};
|
||||
auto config = fixture_config(root.path);
|
||||
BOOST_TEST(!run_once(root.path, config));
|
||||
@@ -479,7 +479,7 @@ BOOST_AUTO_TEST_CASE(readiness_decodes_pages_even_when_checksums_match) {
|
||||
write_file(score_path.parent_path() / std::string{page.at("path").as_string()}, bytes);
|
||||
page["sha256"] = checksum(bytes);
|
||||
write_file(score_path, boost::json::serialize(score));
|
||||
BOOST_REQUIRE(vamp_test::build_catalogue(config.runtime.assets_path, config.database.path));
|
||||
BOOST_REQUIRE(vamp_test::build_catalog(config.runtime.assets_path, config.database.path));
|
||||
auto ready = run_once(root.path, config);
|
||||
BOOST_REQUIRE_MESSAGE(!ready, kind);
|
||||
BOOST_TEST(ready.error().describe().find("first.pages/1.png") != std::string::npos);
|
||||
|
||||
Reference in New Issue
Block a user