File: ssh_test.rb

package info (click to toggle)
vagrant 2.2.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 8,072 kB
  • sloc: ruby: 80,731; sh: 369; makefile: 9; 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