0.0
No commit activity in last 3 years
No release in over 3 years
RSpec tests for service dependencies
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 5.0
~> 10.0

Runtime

~> 3.7
 Project Readme

RSpec tests for Service Dependencies

USAGE

  1. Install the gem
gem install svcdeps_tasks
  1. Add the following to Rakefile:
require 'svcdeps_tasks'

ENV['SVCDEPS_PATH'] = '/etc/svcdeps'
  1. Create a directory for dependencies manifests, /ec/svcdeps in our case:
mkdir /etc/svcdeps
  1. Create dependencies manifests, which are yaml files describing how to check the service dependencies:
deps: 
  - type: tcp
    host: www.google.com
    port: 80
    timeout: 2
    desc: Should be able to tcp port ping www.google.com:80
    
  - type: udp
    host: 8.8.8.8
    port: 53
    timeout: 2
    desc: Should be able to udp port ping DNS server(8.8.8.8:53)

  - type: http
    method: get
    url: https://www.google.com
    insecure: false
    timeout: 2
    desc: Should be able to hit https://www.google.com
    
  - type: command
    command: ping -c 1 8.8.8.8
    timeout: 2 
    desc: Should be able to ping 8.8.8.8
  1. Run:
# rake spec:svcdeps

Service Dependencies
  Should be able to tcp port ping www.google.com:80
  Should be able to udp port ping DNS server(8.8.8.8:53)
  Should be able to hit https://www.google.com
  Should be able to ping 8.8.8.8

Finished in 0.16224 seconds (files took 0.28904 seconds to load)
4 examples, 0 failures