Tapper/Schema/TestrunDB/Result/TestrunDependency.pm

filter: Statementstmt 100% 20 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 100% 24 / 24 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Tapper/Schema/TestrunDB/Result/TestplanInstance.pm ↑ Summary Tapper/Schema/TestrunDB/Result/TestrunPrecondition.pm »
1 package Tapper::Schema::TestrunDB::Result::TestrunDependency;
2 10 our $AUTHORITY = 'cpan:TAPPER';
3 10 $Tapper::Schema::TestrunDB::Result::TestrunDependency::VERSION = '5.0.12';
4 # ABSTRACT: TestrunDependency - dependencies between testruns
5 # Testruns now can depend on each other with one testrun waiting until all the
6 # testruns it depends on have finished
7  
8 10 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 10 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 10 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 10 ▶use parent 'DBIx::Class';
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 10 __PACKAGE__->load_components(qw/Core/);
15 10 __PACKAGE__->table("testrun_dependency");
16 10 __PACKAGE__->add_columns
17 (
18 dependee_testrun_id => {
19 data_type => "INT",
20 default_value => undef,
21 is_nullable => 0,
22 size => 11,
23 },
24 depender_testrun_id => {
25 data_type => "INT",
26 default_value => undef,
27 is_nullable => 0,
28 size => 11,
29 },
30 );
31  
32 10 __PACKAGE__->set_primary_key("dependee_testrun_id","depender_testrun_id");
33  
34 10 (my $basepkg = __PACKAGE__) =~ s/::\w+$//;
35  
36 10 __PACKAGE__->belongs_to(
37 dependee => "${basepkg}::Testrun",
38 { 'foreign.id' => 'self.dependee_testrun_id' },
39 { on_delete => 'CASCADE' },
40 );
41  
42 10 __PACKAGE__->belongs_to(
43 depender => "${basepkg}::Testrun",
44 { 'foreign.id' => 'self.depender_testrun_id' },
45 { on_delete => 'CASCADE' },
46 );
47  
48 __END__
« Tapper/Schema/TestrunDB/Result/TestplanInstance.pm ↑ Summary Tapper/Schema/TestrunDB/Result/TestrunPrecondition.pm »