Git Product home page Git Product logo

functional-test-suite.rb's Introduction

GoIardi Functional Test Suite

An RSpec based test suite to verify goiardi with standard knife commands.

This test suite uses unprivileged LXC for setting up goiardi server in a dedicated container, and testing bootstrapping and chef runs against the goiardi server from seperate containers.

Setup

  • We recommend setting up a ubuntu 14.04 instance for testing, which support unprivileged LXC out of the box.
  • Install LXC, build essential and other development libraries
apt-get install liblxc1 lxc lxc-dev lxc-templates python3-lxc cgmanager-utils build-essential
  • Install ruby and bundler either via apt or via rbenv/ruby-build, anything above ruby 1.8.7 should work fine.
  • Run bundle install sh bundle install --path
  • Invoke the test suite
bundle exec rake spec

A working example of setting up unprivileged LXC via chef can be found here, you can use [GoatOS Base][https://github.com/GoatOS/base] as well if you want a generic LXC based cookbook testing framework.

How the tests work

As part of the test suite following is done in chronological order:

  • goiardi is installed in a fresh ubuntu 14.04 container using chef
  • admin and validation keys are copied over from goiardi container to host system
  • a series of knife CRUD operations on chef domain objects (client, node, cookbooks, databags etc) is performed against the goiardi server
  • 3 more containers are created, bootstrapped using knife against the goiardi server
  • cookbooks involving search is applied against the new container/chef nodes, and assetions are made against search outcomes (files).

functional-test-suite.rb's People

Contributors

ctdk avatar dependabot[bot] avatar fujin avatar ranjib avatar

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.