A simple helper gem to make acceptance testing zonefiles easier
Go to file
R. Tyler Croy 98d355712c
Make it clear where the file should go
2017-01-17 21:02:55 -08:00
bin generated gem 2017-01-17 16:38:59 -08:00
lib Support for verifying all the A records from a zone file 2017-01-17 20:55:29 -08:00
spec Kill all the vim swp files I accidentally checked in 2017-01-17 20:56:26 -08:00
.gitignore Add an initial prototype of zonespec for verifying DNS servers 2017-01-17 20:36:01 -08:00
.travis.yml Do some basic testing in Travis 2017-01-17 20:37:06 -08:00
Gemfile generated gem 2017-01-17 16:38:59 -08:00
README.adoc Make it clear where the file should go 2017-01-17 21:02:55 -08:00
Rakefile Add an initial prototype of zonespec for verifying DNS servers 2017-01-17 20:36:01 -08:00
zonespec.gemspec Add an initial prototype of zonespec for verifying DNS servers 2017-01-17 20:36:01 -08:00

README.adoc

<html lang="en"> <head> </head>

Zonespec

A simple little gem for acceptance testing a provisioned DNS servers ability to respond based on records which were defined in a Zonefile.

spec/zone_acceptance_spec.rb
require 'spec_helper'
require 'zonespec/rspec'

describe dns_server('8.8.8.8') do
  describe zone('jenkins.io', 'path/to/jenkins.io.zone') do
    # Generate all the test cases for CNAME records
    verify_all_cnames!
    # Generate all the test cases for A records
    verify_all_a_records!
  end

  # Instead of testing with a Zone file, it's possible to describe the specific
  # expectations manually.
  describe zone('jenkins.io') do
    it { should serve_cname('www', 'jenkins.io.') }
    it { should serve_a_record('ftp', '127.0.0.1') }
  end
end
</html>