alexanderepstein / Bash-Snippets

A collection of small bash scripts for heavy terminal users

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bats tests failing on my box

mrkafk opened this issue · comments

commented

Issue Label:

  • Bug
  • New feature
  • Enhancement
  • New component

Description:
When I run bats tests in freshly cloned repository I get plenty of errors.

If its a bug make sure to include this section.

OS and OS version:

  • Mac
  • Linux 32 Bit
  • Linux 64 Bit
  • Windows 32 Bit
  • Windows 64 Bit

OS Version: Debian 9 amd64.

Output:

% git remote show origin
* remote origin
  Fetch URL: https://github.com/alexanderepstein/Bash-Snippets.git
  Push  URL: https://github.com/alexanderepstein/Bash-Snippets.git
  HEAD branch: master
  Remote branch:
    master tracked
  Local branch configured for 'git pull':
    master merges with remote master
  Local ref configured for 'git push':
    master pushes to master (up to date)


% bats tests
 ✓ Testing stocks tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/cheat.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/cheat.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/cheat.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get stock info by passing in ticker
   (in test file tests/cheat.bats, line 28)
     `result=$( echo $(stocks AAPL) | grep -Eo "AAPL stock info" )' failed
   /tmp/bats.67901.src: line 28: stocks: command not found
 ✗ Get stock info by passing in company
   (in test file tests/cheat.bats, line 34)
     `result=$( echo $(stocks Apple) | grep -Eo "AAPL stock info" )' failed
   /tmp/bats.67901.src: line 34: stocks: command not found
 ✗ Get the tools version with -v
   (in test file tests/cheat.bats, line 40)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing cloudup tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/cloudup.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/cloudup.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/cloudup.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing crypt tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/crypt.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/crypt.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/crypt.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/crypt.bats, line 30)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing cryptocurrency tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/cryptocurrency.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/cryptocurrency.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/cryptocurrency.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing currency tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/currency.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/currency.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Testing currency exchange (12.35 EUR TO USD)
   (in test file tests/currency.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/currency.bats, line 31)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing geo tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/geo.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/geo.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/geo.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing meme tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/meme.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/meme.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/meme.bats, line 25)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing movies tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/movies.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/movies.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/movies.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get information on a single movie
   (in test file tests/movies.bats, line 29)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/movies.bats, line 38)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing newton tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/newton.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/newton.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Testing newton simplify for [[2x^2]+7]*[4x^2]
   (in test file tests/newton.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Testing newton bad characters in expression 
   (in test file tests/newton.bats, line 32)
     `[ "$status" -eq 1 ]' failed
 ✗ Testing newton bad operation 
   (in test file tests/newton.bats, line 38)
     `[ "$status" -eq 1 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/newton.bats, line 44)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing qrify tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/qrify.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/qrify.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Getting the qr code for a test string
   (in test file tests/qrify.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/qrify.bats, line 37)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/qrify.bats, line 43)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing short tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/short.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/short.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/short.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/short.bats, line 29)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing siteciphers tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/siteciphers.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/siteciphers.bats, line 17)
     `[ "$status" -eq 1 ]' failed
 ✗ The -h option should print usage
   (in test file tests/siteciphers.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/siteciphers.bats, line 36)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing stocks tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/stocks.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/stocks.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/stocks.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get stock info by passing in ticker
   (in test file tests/stocks.bats, line 28)
     `result=$( echo $(stocks AAPL) | grep -Eo "AAPL stock info" )' failed
   /tmp/bats.70499.src: line 28: stocks: command not found
 ✗ Get stock info by passing in company
   (in test file tests/stocks.bats, line 34)
     `result=$( echo $(stocks Apple) | grep -Eo "AAPL stock info" )' failed
   /tmp/bats.70499.src: line 34: stocks: command not found
 ✗ Get the tools version with -v
   (in test file tests/stocks.bats, line 40)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing taste tool
 ✓ The -h option should print usage
 ✓ Testing short recommendations
 ✓ Testing long recommendations
 ✓ Testing search on item
 ✓ No arguments prints usage instructions
 ✓ Get the tools version with -v
 ✓ Testing todo tool
 ✓ Check for latest version of bash-snippets on update
 ✓ No arguments prints usage instructions
 ✓ The -h option should print usage
 ✓ Adding task
 ✓ Getting task
 ✓ Removing task
 ✓ Getting from empty task list
 ✓ Get the tools version with -v
 ✓ Testing transfer tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/transfer.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/transfer.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Testing file upload
   (in test file tests/transfer.bats, line 25)
     `transferResponse=$(transfer $HOME/testFile.txt)' failed with status 127
   /tmp/bats.71560.src: line 25: transfer: command not found
 ✗ Get the tools version with -v
   (in test file tests/transfer.bats, line 57)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing weather tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/weather.bats, line 10)
     `[ "$status" -eq 0 ]' failed
 ✗ The -h option should print usage
   (in test file tests/weather.bats, line 17)
     `[ "$status" -eq 0 ]' failed
 ✗ Testing weather with specified location
   (in test file tests/weather.bats, line 23)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/weather.bats, line 29)
     `[ "$status" -eq 0 ]' failed
 ✓ Testing ytview tool
 ✗ Check for latest version of bash-snippets on update
   (in test file tests/ytview.bats, line 10)
     `[ "$output" = "Bash-Snippets is already the latest version" ]' failed
 ✗ The -h option should print usage
   (in test file tests/ytview.bats, line 16)
     `[ "${lines[0]}" = "Ytview" ]' failed
 ✗ No arguments prints usage instructions
   (in test file tests/ytview.bats, line 21)
     `[ "$status" -eq 0 ]' failed
 ✗ Get the tools version with -v
   (in test file tests/ytview.bats, line 26)
     `result=$( echo $(ytview -v) | grep -Eo "Version")' failed
   /tmp/bats.72193.src: line 26: ytview: command not found

100 tests, 68 failures

Did you install all of the tools? it seems like it just cant find some of them. If you didn't install all of them you will need to run the tests individually by doing bats tests/currency.bats

commented

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

commented

This issue has been automatically closed because it has been inactive for 30 days.