Require tempfile when needed
Machete is the CF buildpack test framework.
The tests require a running instance of Cloud Foundry. By default, it will try to find an instance at the local IP 10.244.0.34. You can specify an alternative Cloud Foundry instance with the --host argument.
--host
Usage :
bundle exec buildpack-build --host=myhost.mydomain
We run our tests with a local bosh-lite deployment. See the github repo for more instructions.
These tests assume an org named pivotal and a space named integration exist. Use these commands to create them:
pivotal
integration
cf create-org pivotal cf create-space integration -o pivotal
git submodule update --init
buildpack-build
bundle exec buildpack-build
Buildpack Modes:
If you only want to run your tests with one mode, you can use the bundle exec buildpack-build [ --cached | --uncached ] script instead.
bundle exec buildpack-build [ --cached | --uncached ]
Errors in the Machete library log to STDOUT by default. You can change Machete’s default log:
Machete.logger = Machete::Logger.new("log/integration.log")
To run the unit test suite, run the following from the base machete directory:
machete
$ rspec
To run the integration test, run the following from the internet_traffic_test directory:
internet_traffic_test
$ cf_exec buildpack-build
You may encounter a silent early exit for scripts cached-build and uncached-build. This is an issue with RVM running inside a bash script with set -e.
set -e
Ensure you have the latest stable version of RVM
$ rvm --version # At least version 1.25.22
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802032778号
Machete
Machete is the CF buildpack test framework.
Prerequisites
Cloud Foundry
The tests require a running instance of Cloud Foundry. By default, it will try to find an instance at the local IP 10.244.0.34. You can specify an alternative Cloud Foundry instance with the
--hostargument.Usage :
We run our tests with a local bosh-lite deployment. See the github repo for more instructions.
These tests assume an org named
pivotaland a space namedintegrationexist. Use these commands to create them:Usage
buildpack-buildscript.Buildpack Modes:
If you only want to run your tests with one mode, you can use the
bundle exec buildpack-build [ --cached | --uncached ]script instead.Logging
Errors in the Machete library log to STDOUT by default. You can change Machete’s default log:
Running Test Suite
To run the unit test suite, run the following from the base
machetedirectory:To run the integration test, run the following from the
internet_traffic_testdirectory:Notes
RVM Version
You may encounter a silent early exit for scripts cached-build and uncached-build. This is an issue with RVM running inside a bash script with
set -e.Ensure you have the latest stable version of RVM