Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[perl] First successful automated test run
Signed-off-by: Michael Brown <mbrown@fensystems.co.uk>
- Loading branch information
Showing
6 changed files
with
77 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
package qPXE::XMPP::Test; | ||
|
||
=head1 NAME | ||
qPXE::XMPP::Test - | ||
=head1 SYNOPSIS | ||
=cut | ||
|
||
use qPXE::Moose; | ||
use strict; | ||
use warnings; | ||
|
||
has "uuid" => ( | ||
is => "ro", | ||
isa => "Str", | ||
required => 1, | ||
); | ||
|
||
has "xmpp" => ( | ||
is => "ro", | ||
isa => "qPXE::XMPP", | ||
required => 1, | ||
); | ||
|
||
method subscribe () { | ||
$self->xmpp->subscribe ( $self->uuid ); | ||
} | ||
|
||
method wait ( Str $id, Int $timeout ) { | ||
return $self->xmpp->wait ( $self->uuid, $id, $timeout ); | ||
} | ||
|
||
method unsubscribe () { | ||
$self->xmpp->unsubscribe ( $self->uuid ); | ||
} | ||
|
||
method BUILD ( HashRef $args ) { | ||
|
||
# Subscribe to test results | ||
$self->subscribe(); | ||
} | ||
|
||
method DEMOLISH ( Bool $in_global_destruction ) { | ||
|
||
# Unsubscribe from test results | ||
$self->unsubscribe(); | ||
} | ||
|
||
__PACKAGE__->meta->make_immutable(); | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters