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

Error if no krb5.conf is found. #92

Merged
merged 2 commits into from
Feb 13, 2023
Merged

Error if no krb5.conf is found. #92

merged 2 commits into from
Feb 13, 2023

Conversation

bodgit
Copy link
Owner

@bodgit bodgit commented Feb 9, 2023

Should mean config.Load() is never called with an empty string.

Should mean `config.Load()` is never called with an empty string.
@bodgit bodgit added the bug Something isn't working label Feb 9, 2023
@bodgit bodgit self-assigned this Feb 9, 2023
Copy link

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @bodgit 👋🏻 !

I recreated the original issue that was raised in terraform-provider-dns and ran it with your library changes.

v1.2.1

=== RUN   TestAccDnsTXTRecordSet_Basic
    resource_dns_txt_record_set_test.go:47: Step 1/6 error: Error running apply: exit status 1

        Error: Error updating DNS record: Error negotiating GSS context: configuration file could not be opened:  open : no such file or directory

          with dns_txt_record_set.foo,
          on terraform_plugin_test.tf line 3, in resource "dns_txt_record_set" "foo":
           3:   resource "dns_txt_record_set" "foo" {

#92 - a2d9455fba66a2347cbb8865b182b7cc957819bc

=== RUN   TestAccDnsTXTRecordSet_Basic
    resource_dns_txt_record_set_test.go:47: Step 1/6 error: Error running apply: exit status 1

        Error: Error updating DNS record: Error negotiating GSS context: 1 error occurred:
        	* stat /etc/krb5.conf: no such file or directory



          with dns_txt_record_set.foo,
          on terraform_plugin_test.tf line 3, in resource "dns_txt_record_set" "foo":
           3:   resource "dns_txt_record_set" "foo" {

Overall this PR looks great! I did have one non-critical note that I left.

Thanks again for taking a look 👋🏻

Also wrap `os.Stat()` error when checking env value.
Copy link

@austinvalle austinvalle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is the result with 45db94c:

=== RUN   TestAccDnsTXTRecordSet_Basic
    resource_dns_txt_record_set_test.go:47: Step 1/6 error: Error running apply: exit status 1

        Error: Error updating DNS record: Error negotiating GSS context: 2 errors occurred:
        	* KRB5_CONFIG: not found
        	* stat /etc/krb5.conf: no such file or directory



          with dns_txt_record_set.foo,
          on terraform_plugin_test.tf line 3, in resource "dns_txt_record_set" "foo":
           3:   resource "dns_txt_record_set" "foo" {

Looks great! 👍🏻

@bodgit bodgit merged commit e486e05 into main Feb 13, 2023
@bodgit bodgit deleted the issue91 branch February 13, 2023 23:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants