Skip to content

refactor!: apply chef-custom-resources workflow (delete actions, InSpec, stale templates)#274

Merged
damacus merged 4 commits intomainfrom
refactor/chef-custom-resources-workflow
Mar 20, 2026
Merged

refactor!: apply chef-custom-resources workflow (delete actions, InSpec, stale templates)#274
damacus merged 4 commits intomainfrom
refactor/chef-custom-resources-workflow

Conversation

@damacus
Copy link
Member

@damacus damacus commented Mar 14, 2026

Apply the chef-custom-resources workflow across all six phases.

Changes

Phase 1: Research

  • Add LIMITATIONS.md documenting platform support, architecture, Java requirements, and known incompatibilities

Phase 2: Structure

  • Move test cookbook from test/fixtures/cookbooks/confluence_test/test/cookbooks/test/
  • Update Berksfile to reference new test cookbook path
  • Update kitchen.yml: provisioner chef_zerochef_infra, run_list refs confluence_test::*test::*, add InSpec verifier paths
  • Remove EOL platforms from kitchen.global.yml (debian-11, ubuntu-20.04, opensuse-leap-15)
  • Add missing oraclelinux-8 and oraclelinux-9 to CI matrix in .github/workflows/ci.yml
  • Remove old ServerSpec integration tests (4 suites + helpers)
  • Remove 4 stale templates (confluence.init.erb, crowd.properties.erb, response.varfile.erb, web_app.conf.erb)

Phase 3: Resources

  • Add # frozen_string_literal: true to all Ruby files
  • Add :delete action to confluence_service — stops, disables, and deletes the systemd unit
  • Add :delete action to confluence_config — removes all 3 managed config files
  • Extend :remove action on confluence_install to also remove home_path

Phase 4: ChefSpec (TDD)

  • Add specs for new :delete/:remove actions (written before implementation)
  • Add frozen_string_literal and documentation formatter to spec_helper.rb
  • 64 examples, 0 failures

Phase 5: Integration Tests

  • Replace ServerSpec with proper InSpec profiles for default and standalone suites
  • Each suite has inspec.yml + controls/ with named controls per convention

Phase 6: Documentation

  • Add :delete action to confluence_service.md and confluence_config.md
  • Update :remove description in confluence_install.md to reflect home_path removal

- Add LIMITATIONS.md documenting platform support and constraints

- Move test cookbook to test/cookbooks/test/, remove old fixtures

- Replace ServerSpec with InSpec profiles for default/standalone suites

- Remove 4 stale templates (confluence.init, crowd.properties, response.varfile, web_app.conf)

- Add :delete action to confluence_service and confluence_config resources

- Extend :remove action on confluence_install to also delete home_path

- Add frozen_string_literal: true to all Ruby files

- Fix kitchen.yml: chef_infra provisioner, updated run_list refs, InSpec verifier paths

- Remove EOL platforms from kitchen.global.yml (debian-11, ubuntu-20.04, opensuse-leap-15)

- Add oraclelinux-8/9 to CI matrix to match kitchen.dokken.yml

- Update documentation for new :delete/:remove actions

- 64 ChefSpec examples, 0 failures
damacus added 2 commits March 19, 2026 17:10
- metadata.rb is managed by release-please and must not be modified
- Remove name argument and platform guard from apt_update in test recipes

- Add required version property to confluence_install :remove doc example
@damacus damacus changed the title refactor: apply chef-custom-resources workflow refactor!: apply chef-custom-resources workflow (delete actions, InSpec, stale templates) Mar 19, 2026
- Without top-level verifier: name: inspec, Kitchen falls back to Busser

- Busser tries to use broken gem environment inside Dokken containers

- Remove suite-level inspec_tests paths (Kitchen auto-discovers test/integration/<suite>/)
@github-actions
Copy link

Slowest examples

Top 10 slowest examples (0.59 seconds, 31.61% of total time)
Example Description Time in seconds
spec/unit/resources/confluence_install_spec.rb:75 confluence_install with default properties creates the logs directory with correct ownership 0.10762
spec/unit/resources/confluence_install_spec.rb:75 confluence_install with default properties creates the temp directory with correct ownership 0.09696
spec/unit/resources/confluence_config_spec.rb:15 confluence_config with default properties creates confluence-init.properties 0.05651
spec/unit/resources/confluence_config_spec.rb:135 confluence_config with :delete action deletes setenv.sh 0.05291
spec/unit/resources/confluence_service_spec.rb:53 confluence_service with :stop action stops the confluence service 0.05015
spec/unit/resources/confluence_install_spec.rb:75 confluence_install with default properties creates the work directory with correct ownership 0.04813
spec/unit/resources/confluence_install_spec.rb:96 confluence_install with custom properties creates the custom group 0.04793
spec/unit/resources/confluence_service_spec.rb:65 confluence_service with :restart action restarts the confluence service 0.04376
spec/unit/resources/confluence_install_spec.rb:130 confluence_install with custom URL and checksum uses the custom URL 0.04348
spec/unit/resources/confluence_install_spec.rb:40 confluence_install with default properties creates the home directory 0.04346

@damacus damacus merged commit 491e8cd into main Mar 20, 2026
33 checks passed
@damacus damacus deleted the refactor/chef-custom-resources-workflow branch March 20, 2026 08:20
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