#4 Add a basic set of tests
Merged by ausil. Opened by lsedlar.
lsedlar/fedpkg-minimal tests  into  master

Download 4.patch

The test script modifies $PATH to point to the tested script first, and also adds a directory with mock scripts replacing curl and hash verification commands with echo. This way when the tests run fedpkg sources, the executed commands are just printed to stdout, where we can capture them and check they are as expected. There is no communication with any real service anywhere.

The tests cover three scenarios now:

  • MD5 hash with old style sources file
  • MD5 hash with BSD style sources file
  • SHA512 hash with BSD style sources file

To run the tests simply execute the run-tests.sh script.

Pull-Request has been merged by ausil

Metadata