diff options
author | John McCrae <john.mccrae@progress.com> | 2022-11-04 07:07:14 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 07:07:14 +0000 |
commit | 1c5ae814a4875fec3c7e2d06cc6943af0aebd2f1 (patch) | |
tree | d2aa9fa6033552792b87b32293657b49094a26b5 | |
parent | 8961e75a51b2839506f47532e566acf927e31260 (diff) | |
parent | 14a169484efb3c622abc8ec4e471c7906eeefa46 (diff) | |
download | chef-1c5ae814a4875fec3c7e2d06cc6943af0aebd2f1.tar.gz |
Merge pull request #13025 from gene1wood/fix_install_snaps_call
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/_snap.rb | 29 | ||||
-rw-r--r-- | kitchen-tests/cookbooks/end_to_end/recipes/linux.rb | 4 | ||||
-rw-r--r-- | lib/chef/provider/package/snap.rb | 2 |
3 files changed, 29 insertions, 6 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/_snap.rb b/kitchen-tests/cookbooks/end_to_end/recipes/_snap.rb index 0a4ba48a58..db4a2b864a 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/_snap.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/_snap.rb @@ -8,7 +8,32 @@ end execute "sleep 5" -snap_package "black" do +snap_package "hello" do + action :install + channel "stable" +end + +snap_package "hello" do action :upgrade - channel "beta" + channel "edge" +end + +snap_package "hello" do + action :remove +end + +snap_package "hello" + +snap_package "hello" do + action :purge +end + +snap_package "hello" do + options ["devmode"] end + +snap_package "hello" do + action :remove +end + +snap_package %w{hello expect}
\ No newline at end of file diff --git a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb index 52b165d04c..a1b621ec13 100644 --- a/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb +++ b/kitchen-tests/cookbooks/end_to_end/recipes/linux.rb @@ -157,6 +157,4 @@ if ::File.exist?("/etc/systemd/system") include_recipe "::_habitat_user_toml" end -# at the moment these do not run properly in docker -# we need to investigate if this is a snap on docker issue or a chef issue -# include_recipe "::_snap" if platform?("ubuntu") +include_recipe "::_snap" if platform?("ubuntu") diff --git a/lib/chef/provider/package/snap.rb b/lib/chef/provider/package/snap.rb index 81af09e04d..4da7040ec2 100644 --- a/lib/chef/provider/package/snap.rb +++ b/lib/chef/provider/package/snap.rb @@ -66,7 +66,7 @@ class Chef if new_resource.source install_snap_from_source(names, new_resource.source) else - install_snaps(names) + install_snaps(names, versions) end end |