is($proc->_devices->{$id}->running, 1, "Process was Started");
$proc->stop();
sleep 1;
isnt($proc->_devices->{$id}->running, 1, "Process was Stop");
};
subtest 'Run Stop Starting' => sub {
{control}{ping}{run} = 0;
subtest 'Run Stop Stopping' => sub {
$proc->run_stop();
sleep 1;
isnt($proc->_devices->{$id}->running, 1, "Process was Stopped");
};
$config->{control}{ping}{run} = 2
'Cleanup' => sub {
$proc->stop();
sleep 1;
isnt($proc->_devices->{$id}->running, 1, "Process was Stopped");
unlink('/tmp/config.json');
isnt( ( -e "/tmp/config.json" ),1 ,"Temp Config Remov
oom}/$date" ),1 ,"Record path created when not defined" );
remove_tree( "/tmp/$config->{room}" );
isnt( ( -d "/tmp/$config->{room}" ),1 ,"Temp Record Path Removed" );
# TODO: need to think accessors/
->stop();
remove_tree( "/tmp/$config->{room}" );
isnt( ( -d "/tmp/$config->{room}" ),1 ,"Temp Record Path Removed" );
unlink('/tmp/config.json');
isnt( ( -e "/tmp/config.json" ),1 ,"Temp Config Remov
ted: $config->{run}");
is($config->backend, "GSTswitch", "Backend generated: $config->{backend}");
};
remove_tree( "$path" );
isnt( ( -d "$path" ),1 ,"Temp Config Path Removed" );
done_testing();
$proc->stop();
sleep 1;
my @procs = grep { $_->cmndline =~ /$command/ } @{ $pt->table };
isnt(@procs, defined, "Process Stopped");
};
subtest 'method: running' => sub {
$proc->pid;
is($p
>record_path);
};
# Kill Test api
kill 9, $pid;
subtest 'Test cleanup' => sub {
remove_tree('/tmp/controller');
isnt( -d '/tmp/controller', 1, "Controller Example removed");
};
done_testing();
c->run_stop;
$count++;
sleep 1;
}
is($count < 20, 1, "Threshold reached correctly in $count iterations");
unlink('/tmp/config.json');
isnt( ( -e "/tmp/config.json" ),1 ,"Temp Config Removed" );