Giter Site home page Giter Site logo

busser-testinfra's Introduction

Busser::RunnerPlugin::Testinfra

A Busser runner plugin for testing testinfra scripts

Installation and Setup

Please read the Busser [plugin usage][plugin_usage] page for more details.

Usage

Please put test files into [COOKBOOK]/test/integration/[SUITES]/testinfra/

`-- test
    `-- integration
        `-- default
            `-- testinfra
                `--test_name.py

The exit code of the script is used as indicator for failure or success.

Note

Globbing pattern to match files is "testinfra/test_*.py".

Development

  • Source hosted at [GitHub][repo]
  • Report issues/questions/feature requests on [GitHub Issues][issues]

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created and maintained by [Jimmy Tang][author] ([email protected])

License

Apache 2.0 (see [LICENSE][license])

busser-testinfra's People

Contributors

jcftang-r7 avatar

Stargazers

Eugen avatar

busser-testinfra's Issues

Verifier Install Failure on Ubuntu-16.04

When using bento vagrant box for Ubuntu-16.04, the kitchen verify fails because the installation fails.

---
driver:
  name: vagrant

provisioner:
  name: chef_zero
  always_update_cookbooks: true

platforms:
  - name: ubuntu-16.04
suites:
  - name: default
    run_list:
      - recipe[hello_web::default]

The Installer will try to do:

pip install testinfra

But there is not pip command on the system, and so this fails. An error is never raised from this, and so the test continue to go forward and run. Also, despite failed installation, the systems think testinfra is installed, it never checks again to see if testinfra is installed.

testinfra --verbose /tmp/verifier/suites/testinfra/test_default.py

Which naturally fails again, because there is no testinfra on the system.

This behavior also happens on other distros as well. I tried freebsd-11.2 and centos-7.

testinfra command deprecated

When running tests with kitchen verify, getting this deprecation warning:

/usr/local/lib/python2.7/dist-packages/testinfra/main.py:20: UserWarning: calling testinfra is deprecated, call py.test instead
  warnings.warn('calling testinfra is deprecated, call py.test instead')

This is because tests are executed using something like this:

testinfra --verbose /tmp/verifier/suites/testinfra/test_default.py

Looking at the current documentation, it looks like tests should be run as:

py.test -v /tmp/verifier/suites/testinfra/test_default.py

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.