Code Monkey home page Code Monkey logo

foreman-bats's Introduction

foreman-bats

BATS installation and cli end-to-end testing scripts for Foreman project

$ git clone https://github.com/sstephenson/bats.git && bats/install.sh /usr/local
$ git clone https://github.com/theforeman/foreman-bats.git && foreman-bats/install.sh /usr/local
$ fb-install-foreman.bats
 ✓ enable epel
 ✓ download and install release package
 ✓ install installer
 ✓ run the installer
 ✓ wait a 10 seconds
 ✓ check web app is up
 ✓ wake up puppet agent
 ✓ install all compute resources
 ✓ restart httpd server
 ✓ collect important logs

10 tests, 0 failures

There is also a helper script that automates git installation and installation of BATS and Foreman BATS:

curl --silent https://raw.github.com/theforeman/foreman-bats/master/bootstrap.sh | bash /dev/stdin

When using fb-install-foreman.bats, the following environment variables can be specified:

  • FOREMAN_REPO: directory name under yum.tf.org (e.g. /releases/1.3, nightly), or component under deb.tf.org (1.3, nightly) to use as Foreman repo
  • FOREMAN_CUSTOM_URL: custom repo URL to configure, overrides use of FOREMAN_REPO for the main Foreman URL
  • MODULE_PATH: override the location of modules used for installation.

Vagrant support

A Vagrantfile is supplied with multi-OS support. This will transfer foreman-bats to the VM and tests can then be executed via vagrant ssh:

vagrant up
vagrant ssh -c 'sudo /vagrant/fb-install-foreman.bats'
   # or...
vagrant up wheezy
vagrant ssh wheezy -c 'sudo /vagrant/fb-install-foreman.bats'

It is also possible to test a different set of modules on all supported platforms:

git clone --recursive https://github.com/theforeman/foreman-installer local
vagrant up
for vm in precise squeeze wheezy f19 el6 ; do
    vagrant ssh $vm -c 'sudo MODULE_PATH=/vagrant/local/modules /vagrant/fb-install-foreman.bats'
done

foreman-bats's People

Contributors

ekohl avatar gregsutcliffe avatar lzap avatar

Watchers

 avatar  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.