second pass: factor out functions from e2e test
Merge pull request #43 from pmorie/deploy-trigger-wip

second pass: factor out functions from e2e test