View | Details | Raw Unified | Return to bug 36093
Collapse All | Expand All

(-)a/t/db_dependent/api/v1/erm_custom_reports.t (-13 lines)
Lines 50-57 subtest "monthly_report" => sub { Link Here
50
50
51
    $schema->storage->txn_begin;
51
    $schema->storage->txn_begin;
52
52
53
    Koha::ERM::EUsage::MonthlyUsages->search->delete;
54
55
    # Run a harvest to populate the database with data
53
    # Run a harvest to populate the database with data
56
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
54
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
57
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
55
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
Lines 61-67 subtest "monthly_report" => sub { Link Here
61
            {
59
            {
62
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
60
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
63
                file_content           => $counter_file,
61
                file_content           => $counter_file,
64
                date_uploaded          => POSIX::strftime( "%Y%m%d%H%M%S", localtime ),
65
                filename               => "Test_TR_J1",
62
                filename               => "Test_TR_J1",
66
            }
63
            }
67
        ]
64
        ]
Lines 151-158 subtest "yearly_report" => sub { Link Here
151
148
152
    $schema->storage->txn_begin;
149
    $schema->storage->txn_begin;
153
150
154
    Koha::ERM::EUsage::YearlyUsages->search->delete;
155
156
    # Run a harvest to populate the database with data
151
    # Run a harvest to populate the database with data
157
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
152
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
158
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
153
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
Lines 162-168 subtest "yearly_report" => sub { Link Here
162
            {
157
            {
163
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
158
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
164
                file_content           => $counter_file,
159
                file_content           => $counter_file,
165
                date_uploaded          => POSIX::strftime( "%Y%m%d%H%M%S", localtime ),
166
                filename               => "Test_TR_J1",
160
                filename               => "Test_TR_J1",
167
            }
161
            }
168
        ]
162
        ]
Lines 243-250 subtest "metric_types_report" => sub { Link Here
243
237
244
    $schema->storage->txn_begin;
238
    $schema->storage->txn_begin;
245
239
246
    Koha::ERM::EUsage::MonthlyUsages->search->delete;
247
248
    # Run a harvest to populate the database with data
240
    # Run a harvest to populate the database with data
249
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
241
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
250
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
242
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
Lines 254-260 subtest "metric_types_report" => sub { Link Here
254
            {
246
            {
255
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
247
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
256
                file_content           => $counter_file,
248
                file_content           => $counter_file,
257
                date_uploaded          => POSIX::strftime( "%Y%m%d%H%M%S", localtime ),
258
                filename               => "Test_TR_J1",
249
                filename               => "Test_TR_J1",
259
            }
250
            }
260
        ]
251
        ]
Lines 341-348 subtest "provider_rollup_report" => sub { Link Here
341
332
342
    $schema->storage->txn_begin;
333
    $schema->storage->txn_begin;
343
334
344
    Koha::ERM::EUsage::MonthlyUsages->search->delete;
345
346
    # Run a harvest to populate the database with data
335
    # Run a harvest to populate the database with data
347
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
336
    my $usage_data_provider = $builder->build_object( { class => 'Koha::ERM::EUsage::UsageDataProviders' } );
348
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
337
    my $counter_file        = $sushi_counter_TR_J1->get_COUNTER_from_SUSHI;
Lines 352-358 subtest "provider_rollup_report" => sub { Link Here
352
            {
341
            {
353
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
342
                usage_data_provider_id => $usage_data_provider->erm_usage_data_provider_id,
354
                file_content           => $counter_file,
343
                file_content           => $counter_file,
355
                date_uploaded          => POSIX::strftime( "%Y%m%d%H%M%S", localtime ),
356
                filename               => "Test_TR_J1",
344
                filename               => "Test_TR_J1",
357
            }
345
            }
358
        ]
346
        ]
359
- 

Return to bug 36093