Changeset 4052


Ignore:
Timestamp:
Dec 10, 2007, 11:43:20 AM (15 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #871: 'Roles' test program should use *.tar.bz2 files instead of *.bz2

Location:
branches/2.5-stable/src/test/net/sf/basedb/test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.5-stable/src/test/net/sf/basedb/test/FileUtil.java

    r4025 r4052  
    2727
    2828import org.apache.tools.bzip2.CBZip2InputStream;
     29
     30import com.ice.tar.TarInputStream;
    2931
    3032import net.sf.basedb.core.DbControl;
     
    6668   
    6769    boolean isBzip = false;
     70    boolean isTar = false;
    6871    if (filename.endsWith(".bz2"))
    6972    {
    7073      isBzip = true;
    7174      filename = filename.substring(0, filename.length()-4);
     75    }
     76    if (filename.endsWith(".tar"))
     77    {
     78      isTar = true;
     79      filename = filename.substring(0, filename.length() - 4);
    7280    }
    7381 
     
    96104          toUpload = new CBZip2InputStream(toUpload);
    97105        }
     106        if (isTar)
     107        {
     108          // Assume that the TAR only contains a single file
     109          TarInputStream tar = new TarInputStream(toUpload);
     110          tar.getNextEntry();
     111          toUpload = tar;
     112        }
    98113        file.upload(toUpload, false, true);
    99114      }
  • branches/2.5-stable/src/test/net/sf/basedb/test/roles/AdminTest.java

    r4025 r4052  
    120120      dc = TestUtil.getDbControl();
    121121      File reporters = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE);
    122       File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv.bz2", FileType.REPORTER);
     122      File affyReporters = FileUtil.uploadFile(dc, "/affymetrix/annotations", "MG_U74Av2_annot.csv.tar.bz2", FileType.REPORTER);
    123123      dc.commit();
    124124     
  • branches/2.5-stable/src/test/net/sf/basedb/test/roles/PowerUserTest.java

    r4025 r4052  
    161161      File plates = FileUtil.uploadFile(dc, "/mouse", "plates_and_reporters.mouse.v4.37k.txt", FileType.PLATE);     
    162162      File printMap = FileUtil.uploadFile(dc, "/mouse", "printmap.mouse.v4.37k.tam", FileType.PRINT_MAP);
    163       File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf.bz2", FileType.REPORTER_MAP);
     163      File cdfFile = FileUtil.uploadFile(dc, "/affymetrix/cdf", "MG_U74Av2.cdf.tar.bz2", FileType.REPORTER_MAP);
    164164      dc.commit();
    165165     
  • branches/2.5-stable/src/test/net/sf/basedb/test/roles/UserTest.java

    r4025 r4052  
    142142      File rawData2DyeSwap = FileUtil.uploadFile(dc, "/mouse", "genepix.mouse.v4.37k.24h.dyeswap.gpr", FileType.RAW_DATA);
    143143     
    144       File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel.bz2", FileType.RAW_DATA);
    145       File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel.bz2", FileType.RAW_DATA);
    146       File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel.bz2", FileType.RAW_DATA);
     144      File affy1 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1761.cel.tar.bz2", FileType.RAW_DATA);
     145      File affy2 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1762.cel.tar.bz2", FileType.RAW_DATA);
     146      File affy3 = FileUtil.uploadFile(dc, "/affymetrix/E-TEST-1.ebi.ac.uk", "jos1763.cel.tar.bz2", FileType.RAW_DATA);
    147147      dc.commit();
    148148     
Note: See TracChangeset for help on using the changeset viewer.