control "Validate source tarballs" do
  impact 1.0
  title "Source tarball checksums match"
  desc "Verify the omnibus-toolchain source tarball matches both its sha256 and sha512 checksum files."

  describe command 'bash -c "cd source/ && sha256sum -c omnibus-toolchain-[0-9]*.tar.xz.sha256sum"' do
    its("exit_status") { should eq 0 }
    its("stdout") { should match(/OK$/) }
  end

  describe command 'bash -c "cd source/ && sha512sum -c omnibus-toolchain-[0-9]*.tar.xz.sha512sum"' do
    its("exit_status") { should eq 0 }
    its("stdout") { should match(/OK$/) }
  end
end
