Git Product home page Git Product logo

vcap-yeti's Introduction

Yeti

Yeti stands for "Yet Extraordinary Test Infrastructure" and is a collection of integration tests for the CloudFoundry platform.

Running Tests

Prepare for tests:

git submodule update --init
bundle
bundle exec rake prepare

Non-parallel

Tests require several environment variables to be set:

export VCAP_BVT_API_ENDPOINT="http://api.example.com"

export VCAP_BVT_USER="[email protected]"
export VCAP_BVT_USER_PASSWD="non-admin-password"

After setting up your environment you can use regular rspec to run tests:

bundle exec rspec
bundle exec rspec spec/apps/ruby_spec.rb

Tip: If you do not want to set VCAP_BVT_USER and VCAP_BVT_USER_PASSWD you can run rake prepare (task used with parallel set up) once and after that tests will just use first parallel user. (You will have to set the VCAP_BVT_ADMIN_USER and VCAP_BVT_ADMIN_USER_PASSWD for this. See below.)

Parallel

Tests require several environment variables to be set:

export VCAP_BVT_API_ENDPOINT="http://api.example.com"
export VCAP_BVT_UAA_CC_SECRET="some-secret"

export VCAP_BVT_ADMIN_USER="[email protected]"
export VCAP_BVT_ADMIN_USER_PASSWD="admin-password"

Optional environment variables:

Will create organizations with this string - useful for automated clean-up. export VCAP_BVT_ORG_NAMESPACE="jenkins"

(Admin credentials are only used for creating other users.)

Run rake prepare to create 16 users to be used in parallel specs. (User credentials will be stored in ~/.bvt/config.yml)

After setting up your environment here is how to run tests in parallel:

parallel_rspec spec
parallel_rspec spec -o '--tag=some-tag'

See parallel_tests gem for more information.

Debugging Tips

  • VCAP_BVT_TRACE=1 turns on tracing of cfoundry calls

vcap-yeti's People

Contributors

andyzh avatar cf-frameworks avatar dliebreich avatar dsyer avatar eaglechen avatar figof avatar kushmerick avatar mariash avatar mark-rushakoff avatar matthewmcnew avatar mmb avatar mreider avatar oppegard avatar pbozeman avatar pietern avatar pxie avatar ryantang avatar slimyang avatar vito avatar youngm avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vcap-yeti's Issues

missing rb-readline gem breaks test execution

During bundler execution of rspec, results in:

var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/cf-722e233a782d/lib/console/console.rb:2:in `require': cannot load such file -- readline (LoadError)
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/bundler/gems/cf-722e233a782d/lib/console/console.rb:2:in `<top (required)>'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/lib/harness/console_helper.rb:1:in `require'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/lib/harness/console_helper.rb:1:in `<top (required)>'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/lib/harness.rb:47:in `require'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/lib/harness.rb:47:in `<top (required)>'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/spec/apps/async_staging_spec.rb:1:in `require'
    from /var/lib/jenkins/jobs/vcap-yeti/workspace/spec/apps/async_staging_spec.rb:1:in `<top (required)>'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `load'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `block in load_spec_files'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `each'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/configuration.rb:896:in `load_spec_files'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/command_line.rb:22:in `run'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:80:in `run'
    from /var/lib/jenkins/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/rspec-core-2.14.5/lib/rspec/core/runner.rb:17:in `block in autorun'

Switch to latest, vanilla Heroku nodjs buildpack breaks yeti tests for Node

The file spec/apps/node_spec.rb needs to be revised.

The latest buildpack from heroku doesn't support Node 0.6 anymore. This is because semver.io gives this answer:
https://semver.io/node/resolve/0.6.x -> 0.10.24

I've reported this as an issue against node-version-resolver heroku/node-version-resolver#1

  • I suspect it is because Node 0.6 doesn't include npm which is assumed in the new buidlpack.

For some reason the Node 0.10.24 version and bcrypt seem to be cranky. I haven't dug enough into this, it may be some other issue. Don't be surprised if you hit problems here. I found that 0.10.21 worked fine, but need to see if it's a specific 0.10.24 problem, or my environment.

The last issue is that the 'old' buildpack installs semver along side of node. The new one does not. So the node_spec.rb code above, it looks for semver as a 'git module', and fails with the new buildpack.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.