Sha256: 18956a9dff3e137b33e9608291d36680a127d81f2993509a1f7422cafd709cc1
Contents?: true
Size: 806 Bytes
Versions: 17
Compression:
Stored size: 806 Bytes
Contents
require File.expand_path("../../../base", __FILE__) require "vagrant/util/platform" require "vagrant/util/ssh" describe Vagrant::Util::SSH do include_context "unit" describe "checking key permissions" do let(:key_path) { temporary_file } it "should do nothing on Windows" do allow(Vagrant::Util::Platform).to receive(:windows?).and_return(true) key_path.chmod(0700) # Get the mode now and verify that it is untouched afterwards mode = key_path.stat.mode described_class.check_key_permissions(key_path) expect(key_path.stat.mode).to eq(mode) end it "should fix the permissions", :skip_windows do key_path.chmod(0644) described_class.check_key_permissions(key_path) expect(key_path.stat.mode).to eq(0100600) end end end
Version data entries
17 entries across 14 versions & 4 rubygems