Skip to content

refactor: apply chef-custom-resources workflow#274

Open
damacus wants to merge 1 commit intomainfrom
refactor/chef-custom-resources-workflow
Open

refactor: apply chef-custom-resources workflow#274
damacus wants to merge 1 commit 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 damacus requested a review from a team as a code owner March 14, 2026 13:47
@github-actions
Copy link

Slowest examples

Top 10 slowest examples (0.5 seconds, 31.83% 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.0902
spec/unit/resources/confluence_install_spec.rb:75 confluence_install with default properties creates the temp directory with correct ownership 0.08269
spec/unit/resources/confluence_config_spec.rb:15 confluence_config with default properties creates confluence-init.properties 0.04753
spec/unit/resources/confluence_config_spec.rb:135 confluence_config with :delete action deletes setenv.sh 0.04539
spec/unit/resources/confluence_service_spec.rb:53 confluence_service with :stop action stops the confluence service 0.04284
spec/unit/resources/confluence_install_spec.rb:96 confluence_install with custom properties creates the custom group 0.0416
spec/unit/resources/confluence_install_spec.rb:75 confluence_install with default properties creates the work directory with correct ownership 0.04099
spec/unit/resources/confluence_install_spec.rb:100 confluence_install with custom properties creates the custom user 0.03886
spec/unit/resources/confluence_install_spec.rb:17 confluence_install with default properties creates the confluence group 0.03782
spec/unit/resources/confluence_install_spec.rb:40 confluence_install with default properties creates the home directory 0.03773

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