sous-chefs / java

Development repository for the java cookbook
https://supermarket.chef.io/cookbooks/java
Apache License 2.0
386 stars 637 forks source link

java_certificate resource :remove fails #617

Closed freakinhippie closed 3 years ago

freakinhippie commented 4 years ago

:speaking_head: Foreword

Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.

:ghost: Brief Description

When attempting to use the java_certificate resource's :remove action, the resource fails with the following error:

Caused by NameError: undefined local variable or method `new_reource' for #<#<Class:0x0000000005be6180>:0x0000000005dd1940>
/tmp/kitchen/cache/cookbooks/java/resources/certificate.rb:134:in `block in class_from_file'

:pancakes: Cookbook version

8.1.2, latest pulled from github.

:woman_cook: Chef-Infra Version

Chef v15.10.12

:tophat: Platform details

Running on ubuntu-18.04

Steps To Reproduce

Steps to reproduce the behavior:

  1. java_certificate 'java_certificate_ssl_endpoint' do ssl_endpoint 'google.com:443' end

    java_certificate 'java_certificate_ssl_endpoint' do action :remove end

:police_car: Expected behavior

The certificate should be removed from the keystore, if it exists.