Bug 37893: (QA follow-up): Fix pod_coverage.t
To test: prove -v /kohadevbox/koha/xt/author/pod_coverage.t The changes to Schema files are fixes that were overlooked originally. The 'die' line in C4/SIP/Sip/Configuration.pm is to force the script to die if SIP configuration does not exist, which only happens when running pod_coverage.t The original code (prior to 37893) did not consider the possibiliy of a config_file being invalid or undef, parser->XMLin(config_file) died silently, but because pod_coverage.t skips over files that die, it didn't fail. See bug 41271. Now, with the changes from bug 37893, if a config_file doesnt exist the code falls back to whats in the cache, so it doesn't try to XMLin load an invalid config_file anymore, and fails verbosely. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
2c3809bbf9
commit
0bbd97a4b9
|
|
@ -56,6 +56,7 @@ sub get_configuration {
|
|||
} else {
|
||||
$cfg = $current_config;
|
||||
}
|
||||
die unless $cfg;
|
||||
my %listeners;
|
||||
|
||||
# The key to the listeners hash is the 'port' component of the
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ This is the base class for SIP2 objects in the Koha library system.
|
|||
|
||||
=head3 store
|
||||
|
||||
store
|
||||
store wrapper
|
||||
|
||||
=cut
|
||||
|
||||
|
|
@ -50,6 +50,12 @@ sub store {
|
|||
return $self->SUPER::store;
|
||||
}
|
||||
|
||||
=head3 delete
|
||||
|
||||
delete wrapper
|
||||
|
||||
=cut
|
||||
|
||||
sub delete {
|
||||
my ($self) = @_;
|
||||
|
||||
|
|
@ -57,6 +63,12 @@ sub delete {
|
|||
return $self->SUPER::delete;
|
||||
}
|
||||
|
||||
=head3 _update_config_timestamp
|
||||
|
||||
Updates the sip2_resource_last_modified timestamp in cache
|
||||
|
||||
=cut
|
||||
|
||||
sub _update_config_timestamp {
|
||||
my $cache = Koha::Caches->get_instance();
|
||||
$cache->set_in_cache( 'sip2_resource_last_modified', dt_from_string()->epoch );
|
||||
|
|
|
|||
|
|
@ -581,9 +581,22 @@ __PACKAGE__->add_columns(
|
|||
"+show_outstanding_amount" => { is_boolean => 1 }
|
||||
);
|
||||
|
||||
=head2 koha_objects_class
|
||||
|
||||
Koha Objects class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_objects_class {
|
||||
'Koha::SIP2::Accounts';
|
||||
}
|
||||
|
||||
=head2 koha_object_class
|
||||
|
||||
Koha Object class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_object_class {
|
||||
'Koha::SIP2::Account';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -121,10 +121,22 @@ __PACKAGE__->belongs_to(
|
|||
|
||||
# You can replace this text with custom code or comments, and it will be preserved on regeneration
|
||||
|
||||
=head2 koha_objects_class
|
||||
|
||||
Koha Objects class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_objects_class {
|
||||
'Koha::SIP2::Accounts::SystemPreferenceOverrides';
|
||||
}
|
||||
|
||||
=head2 koha_object_class
|
||||
|
||||
Koha Object class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_object_class {
|
||||
'Koha::SIP2::Account::SystemPreferenceOverride';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -195,9 +195,22 @@ __PACKAGE__->add_columns(
|
|||
"+status_update" => { is_boolean => 1 }
|
||||
);
|
||||
|
||||
=head2 koha_objects_class
|
||||
|
||||
Koha Objects class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_objects_class {
|
||||
'Koha::SIP2::Institutions';
|
||||
}
|
||||
|
||||
=head2 koha_object_class
|
||||
|
||||
Koha Object class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_object_class {
|
||||
'Koha::SIP2::Institution';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,11 +72,22 @@ __PACKAGE__->set_primary_key("sip_system_preference_override_id");
|
|||
# Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-10 10:27:51
|
||||
# DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:szyNGurH+wJBItdnYfAoRA
|
||||
|
||||
=head2 koha_objects_class
|
||||
|
||||
Koha Objects class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_objects_class {
|
||||
'Koha::SIP2::SystemPreferenceOverrides';
|
||||
}
|
||||
|
||||
=head2 koha_object_class
|
||||
|
||||
Koha Object class
|
||||
|
||||
=cut
|
||||
|
||||
sub koha_object_class {
|
||||
'Koha::SIP2::SystemPreferenceOverride';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue