File: ssh_test.rb

package info (click to toggle)
vagrant 2.2.14%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 9,800 kB
  • sloc: ruby: 97,301; sh: 375; makefile: 16; lisp: 1
file content (15 lines) | stat: -rw-r--r-- 438 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require_relative "../../../../base"

require_relative "../../../../../../plugins/hosts/linux/cap/ssh"

describe VagrantPlugins::HostLinux::Cap::SSH do
  let(:subject){ VagrantPlugins::HostLinux::Cap::SSH }

  let(:env){ double("env") }
  let(:key_path){ double("key_path") }

  it "should set file as user only read/write" do
    expect(key_path).to receive(:chmod).with(0600)
    subject.set_ssh_key_permissions(env, key_path)
  end
end