control 'fivetran' do
  title 'fivetran ssh instance'
  desc 'Configure the fivetran proxy instance'

  fivetran_user = 'fivetran'
  fivetran_home_dir = '/home/fivetran'

  describe sshd_config do
    its('Port') { should eq('22') }
    its('PasswordAuthentication') { should eq 'no' }
  end

  describe user(fivetran_user) do
    it { should exist }
    its('home') { should eq fivetran_home_dir }
    its('shell') { should eq '/bin/bash' }
  end

  describe directory("#{fivetran_home_dir}/.ssh") do
    it { should exist }
    its('owner') { should eq fivetran_user }
    its('group') { should eq fivetran_user }
  end
end
