QA:Testcase fpe upload sources

From FedoraProject

Jump to: navigation, search

Contents

Description

This test case tests whether archives of sources of software required for their Fedora packages can be uploaded to the lookaside cache. Once sources have been uploaded, it should be possible to download them.

Setup

  1. Boot into the machine/VM you wish to test.
  2. Install eclipse-fedorapackager-0.2.1-1.fc16 via yum install eclipse-fedorapackager.
  3. Make sure that file ~/.fedora.cert exists.
  4. Ensure that you have source archives handy for a package you maintain. If you don't have that you may skip this test.

How to test

  1. Open Eclipse and use a new workspace. eclipse -data test_day_20111013_fpe_upload_sources
  2. Press Ctrl+Alt+F I to open the import wizard. Alternatively press Ctrl+3 and start typing "Projects from Fedora Git", then press return.
  3. Enter the package name of a package you maintain, make sure that Eclipse found your ~/.fedora.cert and was able to extract your FAS username from the certificate - there should be a message similar to the following image showing you that - then click "Finish".
    FedoraPackagerForEclipseExtractedUsername.png
  4. The package you've just cloned should show up in your workspace.
  5. Next, copy sources you'd like to upload into the project in your workspace. You can do that by drag-and-drop by opening up nautilus, navigating to the source tarball and dragging it into the project. If the sources are available via an URL you can use that URL in the .spec file directly and use the .spec file editor to dowload the referenced file directly Ctrl + hover over URL.
  6. Once the archive with the sources of the package you maintain are in your project in Eclipse, right-click on the archive file => "Fedora Packager" => "Upload This File" => "Add to existing sources"/"Replace existing sources". "Add to existing" sources means that it will append to the sources file, whereas "Replace existing sources" will erase what's currently in the sources file and create only a single entry for the new sources archive you've just uploaded. Note that both actions will upload sources to the lookaside cache.

Expected Results

  1. sources should have changed according to the action you've carried out. I.e. "Add to existing sources" should have appended, "Replace existing sources" should have erased existing entries and created a new, single entry with the MD5 sum of the source and its filename.
  2. The archive file you've uploaded should now be ignored by Git. I.e. an entry should have been added to your .gitignore file.
  3. The archive should now be available in the lookaside cache. In order to check this, delete the source archive file you've just uploaded from your project in Eclipse, right-click on the .spec file, "Fedora Packager" => "Download Sources". This should download files listed in the sources file and should have recreated the file you've just deleted.