File: client_spec.rb

package info (click to toggle)
puppet-module-saz-ssh 13.1.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 564 kB
  • sloc: ruby: 1,511; sh: 10; makefile: 7
file content (39 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# frozen_string_literal: true

require 'spec_helper'

describe 'ssh::client', type: 'class' do
  on_supported_os.each do |os, os_facts|
    context "on #{os}" do
      let(:facts) { os_facts }

      context 'with no other parameters' do
        it { is_expected.to compile.with_all_deps }
        it { is_expected.to contain_class('ssh::knownhosts') }
        it { is_expected.to contain_class('ssh::client::config') }
        it { is_expected.to contain_class('ssh::client::install') }
        it { is_expected.to contain_concat('/etc/ssh/ssh_config') }
      end

      context 'with a different ssh_config location' do
        let :params do
          {
            ssh_config: '/etc/ssh/another_ssh_config'
          }
        end

        it { is_expected.to contain_concat('/etc/ssh/another_ssh_config') }
      end

      context 'with storeconfigs_enabled set to false' do
        let :params do
          {
            storeconfigs_enabled: false
          }
        end

        it { is_expected.not_to contain_class('ssh::knownhosts') }
      end
    end
  end
end