require "spec_helper"

describe package("httpd"), if: os[:family] == "redhat" do
  it { should be_installed }
end

describe service("httpd"), if: os[:family] == "redhat" do
  it { should be_enabled }
  it { should be_running }
end

describe port(80) do
  it { should be_listening }
end

describe file("/mnt/rbuploads") do
  it { should be_mounted }
end

describe process("memcached") do
  it { should be_running }
end

describe user("qauser") do
  it { should exist }
end

describe host("oa.qaorch.com") do
  it { should be_resolvable.by("dns") }
end

describe host("oa.qaorch.com") do
  its(:ipaddress) { should eq "192.168.31.52" }
end

describe host("workstation.qaorch.com") do
  it { should be_resolvable.by("dns") }
end

describe host("workstation.qaorch.com") do
  its(:ipaddress) { should eq "192.168.31.52" }
end

describe host("webservice.qaorch.com") do
  it { should be_resolvable.by("dns") }
end

describe host("webservice.qaorch.com") do
  its(:ipaddress) { should eq "192.168.31.53" }
end

describe host("webservices.qaorch.com") do
  it { should be_resolvable.by("dns") }
end

describe host("webservices.qaorch.com") do
  its(:ipaddress) { should eq "192.168.31.52" }
end
