Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use the archive_file resource - Chef 15+ #2

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

chrisminton
Copy link

@chrisminton chrisminton commented May 24, 2022

  • deprecate the tar_archive resource for archive_file, this requires Chef 15+
  • remove the tar cookbook dependency
  • add some tests
  • update OS used in test frameworks
  File /usr/local/bin/consul-template
     ✔  is expected to be file
     ✔  is expected to be executable
  Service consul-template
     ✔  is expected to be enabled
     ✔  is expected to be running
  File /etc/consul-template.d/test
     ✔  is expected to be file
     ✔  content is expected to match "source = \"/tmp/test.config.ctmpl\""
     ✔  content is expected to match "destination = \"/tmp/test.config\""
     ✔  content is expected to match "command = \"touch /tmp/consul-template-command-test\""
  File /tmp/consul-template-command-test
     ✔  is expected to be file

Test Summary: 9 successful, 0 failures, 0 skipped
       Finished verifying <default-centos> (0m8.81s).
-----> Test Kitchen is finished. (0m11.17s)


  File /usr/local/bin/consul-template
     ✔  is expected to be file
     ✔  is expected to be executable
  Service consul-template
     ↺  The `service` resource is not supported on your OS yet.
  File /etc/consul-template.d/test
     ✔  is expected to be file
     ✔  content is expected to match "source = \"/tmp/test.config.ctmpl\""
     ✔  content is expected to match "destination = \"/tmp/test.config\""
     ✔  content is expected to match "command = \"touch /tmp/consul-template-command-test\""
  File /tmp/consul-template-command-test
     ✔  is expected to be file

Test Summary: 7 successful, 0 failures, 1 skipped
       Finished verifying <default-debian> (0m8.31s).
-----> Test Kitchen is finished. (0m10.54s)


  File /usr/local/bin/consul-template
     ✔  is expected to be file
     ✔  is expected to be executable
  Service consul-template
     ✔  is expected to be enabled
     ✔  is expected to be running
  File /etc/consul-template.d/test
     ✔  is expected to be file
     ✔  content is expected to match "source = \"/tmp/test.config.ctmpl\""
     ✔  content is expected to match "destination = \"/tmp/test.config\""
     ✔  content is expected to match "command = \"touch /tmp/consul-template-command-test\""
  File /tmp/consul-template-command-test
     ✔  is expected to be file

Test Summary: 9 successful, 0 failures, 0 skipped
       Finished verifying <default-ubuntu> (0m8.60s).

consul-template::default
  default
    symlinks to /usr/local/bin/consul-template
    should create the consul-template config directory
    should create the consul-template systemd unit
    should start the consul-template service
    should create the consul-template service user
    should enable the consul-template service
  additional settings
    should create the consul-template systemd unit with additional settings

consul_template_config resource
  create
    should create the consul_template_config
    should create the config file
    should create the ctmplfile
    should add the test key/value
    should notify consul-template to restart

Finished in 5.73 seconds (files took 3.18 seconds to load)
12 examples, 0 failures

- deprecate the tar_archive resource for archive_file, this requires Chef 15+
- remove the tar cookbook dependency
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant