Skip to content

Commit

Permalink
Modify tests to handle sandbox quirks better
Browse files Browse the repository at this point in the history
  • Loading branch information
kablamo committed May 24, 2016
1 parent 64fb5fb commit 2927b63
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions t/v2.0/dnsmadeeasy.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ SKIP: {

isa_ok($dns,'WebService::DNSMadeEasy');

subtest setup => sub {
my $domain = $dns->get_managed_domain($domain_name);
#$domain->delete;
#$domain->wait_for_delete;
pass 'setup complete';
};

#subtest 'managed domains' => sub {
# my @domains = $dns->managed_domains;
# is scalar @domains, 0, "no managed domains";
# ok scalar @domains > 0, "found some managed domains";

# my $domain = $dns->create_managed_domain($domain_name);
# $domain->wait_for_pending_action;
# #$domain->wait_for_pending_action; # can't test this in sandbox
# is $domain->name, $domain_name, "created $domain_name";
#};

Expand Down Expand Up @@ -115,6 +108,16 @@ SKIP: {
ok !$monitor->monitor, '!monitor';
ok !$monitor->auto_failover, '!auto_failover';
};

subtest cleanup => sub {
note "deleting $domain_name in 5 seconds...";
sleep 5;
my $domain = $dns->get_managed_domain($domain_name);
eval { $domain->delete };
like $@, qr/Cannot delete a domain that is pending a create/;
#$domain->wait_for_delete; # can't test this in sandbox
pass 'cleanup complete';
};
}

done_testing;

0 comments on commit 2927b63

Please sign in to comment.