You're assuming this test is run from the cf-upgrade directory as tests/cf-upgrade-test.sh; you should start by checking that, optionally with some rough quick look at $0 (and maybe $PWD) to see if you can work out where you actually are and cd to the expected place, aborting and explaining the problem otherwise.