4 use Test::More tests => 2;
8 use CXGN::Genomic::Clone;
9 use CXGN::PotatoGenome::FileRepository;
12 use_ok('SGN::Controller::Clone::Genomic');
14 my $tempdir = File::Temp->newdir;
15 my $tempfile = File::Temp->new;
16 file($tempfile->filename)->openw->print(">RH123D21\nACTGACTGACTAGATGATCATCGATCGAGAGCG\n");
18 my $repos = CXGN::PotatoGenome::FileRepository->new( "$tempdir" );
20 my $ctl = SGN::Controller::Clone::Genomic->new;
21 my $clone = CXGN::Genomic::Clone->retrieve_from_clone_name( 'RH123D21' );
26 $test_vf = $repos->get_vf( class => 'SingleCloneSequence',
27 sequence_name => $clone->latest_sequence_name,
29 project => $clone->seqprops->{project_country} );
31 skip 'could not retrieve clone, cannot test _potato_seq_files', 1 unless $test_vf;
33 $repos->publish( $test_vf->publish_new_version( $tempfile->filename ) );
35 skip 'could not retrieve clone, cannot test _potato_seq_files', 1 unless $clone;
37 my %files = $ctl->_potato_seq_files( undef, $clone, $tempdir );
38 ok( -f $files{seq}, 'got a potato seq file' )
39 or diag Dumper { files => \%files, find => scalar(`find $tempdir`) };