Skip to content

Commit

Permalink
sshkey: do not test type update, it's a parameter in Puppet 6
Browse files Browse the repository at this point in the history
  • Loading branch information
raphink committed May 29, 2020
1 parent 4538e78 commit b12aa29
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions spec/unit/puppet/provider/sshkey/augeas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@
it "should modify clear value" do
apply!(Puppet::Type.type(:sshkey).new(
:name => "foo.example.com",
:type => "ssh-dss",
:type => "ssh-rsa",
:key => "DEADMEAT",
:target => target,
:provider => "augeas"
))

aug_open(target, "Known_Hosts.lns") do |aug|
aug.get('./2/type').should == 'ssh-dss'
aug.get('./2/key').should == 'DEADMEAT'
end
end
Expand All @@ -139,14 +138,13 @@
it "should modify hashed value" do
apply!(Puppet::Type.type(:sshkey).new(
:name => "bar.example.com",
:type => "ssh-dss",
:type => "ssh-rsa",
:key => "DEADMEAT",
:target => target,
:provider => "augeas"
))

aug_open(target, "Known_Hosts.lns") do |aug|
aug.get('./1/type').should == 'ssh-dss'
aug.get('./1/key').should == 'DEADMEAT'
end
end
Expand All @@ -173,7 +171,7 @@
it "should update alias of hashed value" do
apply!(Puppet::Type.type(:sshkey).new(
:name => "bar.example.com",
:type => "ssh-dss",
:type => "ssh-rsa",
:key => "ABCDE",
:host_aliases => [ 'qux' ],
:target => target,
Expand All @@ -182,9 +180,7 @@

aug_open(target, "Known_Hosts.lns") do |aug|
aug.match('./*[label()!="#comment"]').size.should == 3
aug.get('./1/type').should == 'ssh-dss'
aug.get('./1/key').should == 'ABCDE'
aug.get('./3/type').should == 'ssh-dss'
aug.get('./3/key').should == 'ABCDE'
end
end
Expand Down

0 comments on commit b12aa29

Please sign in to comment.