It might be worth adding a check here to ensure that the other 3 environment vars are actually set, and giving a meaningful error if they are not.  Or at least trying a run with only that DBTEST_TYPE set and make sure that the error you get gives you enough info to solve your problem.