Sha256: d227a072029b6f86b10be04ad347c7d8d2949bb18eef39b13dcbb8fb33105e56
Contents?: true
Size: 768 Bytes
Versions: 19
Compression:
Stored size: 768 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 Vagrant::Util::Platform.stub(: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) key_path.stat.mode.should == mode end it "should fix the permissions" do key_path.chmod(0644) described_class.check_key_permissions(key_path) key_path.stat.mode.should == 0100600 end end end
Version data entries
19 entries across 19 versions & 6 rubygems