Skip to content

Need some help with implementing a provider for GoDaddy #2596

@nvanlaerebeke

Description

@nvanlaerebeke

I've been trying my hand at creating a provider for godaddy where I have my domains.

Need some help with the implementation, gotten some things working already but still have quite a few tests failing.

Have no GO experience at all, this is the first time doing anything in the language but did somewhat manage I think.

The fork can be found here:
https://github.com/nvanlaerebeke/dnscontrol/tree/feature/godaddy

Trying to get all the integration tests working, I'm having some issues with the CNAME and MX records now where the domain is being appended to the data, example the output for the "Create_a_CNAME" test:

=== RUN   TestDNSProviders
=== RUN   TestDNSProviders/example.com
=== RUN   TestDNSProviders/example.com/03:CNAME:Create_a_CNAME
WARNING: + CREATE testcname.example.com CNAME www.google.com. ttl=600
WARNING: ± MODIFY testcname.example.com CNAME (www.google.com.example.com. ttl=600) -> (www.google.com. ttl=600)
    integration_test.go:277: Expected 0 corrections on second run, but found 1.
    integration_test.go:279: UNEXPECTED #0: ± MODIFY testcname.example.com CNAME (www.google.com.example.com. ttl=600) -> (www.google.com. ttl=600)
--- FAIL: TestDNSProviders (1.98s)
    --- FAIL: TestDNSProviders/example.com (1.98s)
        --- FAIL: TestDNSProviders/example.com/03:CNAME:Create_a_CNAME (1.17s)
FAIL
exit status 1
FAIL	github.com/StackExchange/dnscontrol/v4/integrationTest	1.989s

The CNAME record is correctly created, but for some reason it checks with the 'www.google.com.' during the verification.

It's implemented with diff2 just as mentioned in the docs.
I'm working on this on and off when I have some brain power left after work so apologies if progress isn't super fast.

Current progress on the tests

OK:

00:A:Create_A 
01:Apex:Create_A 
02:Protocol-Wildcard:Create_wildcard 
05:TXT:Create_TXT
06:ManyAtOnce:CreateManyAtLabel
09:TTL:Start
11:TypeChange:Create_A
13:CNAME:Record_pointing_to_@
16:complex_TXT:TXT_with_1_single-quote
18:testByLabel:initial
20:IDNA:Internationalized_name
22:pager101:99_records 


NOT OK:

03:CNAME:Create_a_CNAME 
04:MX:Create_MX 
07:manyTypesAtOnce:CreateManyTypesAtLabel
08:Attl:Create_Arc
10:add_to_label_and_change_orig_ttl:Setup 
12:TypeChangeHard:Create_a_CNAME 
14:MX:Record_pointing_to_@  
15:NS:NS_for_subdomain 
17:Case_Sensitivity:Create_CAPS
19:testByRecordSet:initial 
21:IDNAs_in_CNAME_targets:IDN_CNAME_AND_Target
61:IGNORE_TARGET_function_CNAME:Create_some_records


SKIPPED:
  
23:pager601_***SKIPPED(disabled_by_only)***:Empty (0.20s)
24:pager1201_***SKIPPED(disabled_by_only)***:Empty (0.20s)
25:CAA_***SKIPPED(CanUseCAA_not_supported)***:Empty (0.20s)
26:LOC_***SKIPPED(CanUseLOC_not_supported)***:Empty (0.20s)
27:NAPTR_***SKIPPED(CanUseNAPTR_not_supported)***:Empty (0.19s)
28:PTR_***SKIPPED(CanUsePTR_not_supported)***:Empty (0.18s)
29:SOA_***SKIPPED(CanUseSOA_not_supported)***:Empty (0.24s)
30:SRV_***SKIPPED(CanUseSRV_not_supported)***:Empty (0.20s)
31:SRV_***SKIPPED(CanUseSRV_not_supported)***:Empty (0.20s)
32:SSHFP_***SKIPPED(CanUseSSHFP_not_supported)***:Empty (0.20s)
33:TLSA_***SKIPPED(CanUseTLSA_not_supported)***:Empty (0.20s)
34:DS_***SKIPPED(CanUseDS_not_supported)***:Empty (0.18s)
35:DS_(children_only)_***SKIPPED(CanUseDSForChildren_not_supported)***:Empty (0.19s)
36:DS_(children_only)_CLOUDNS_***SKIPPED(CanUseDSForChildren_not_supported)***:Empty (0.19s)
37:ALIAS_***SKIPPED(CanUseAlias_not_supported)***:Empty (0.26s)
38:AZURE_ALIAS_A_***SKIPPED(CanUseAzureAlias_not_supported)***:Empty (0.18s)
39:AZURE_ALIAS_CNAME_***SKIPPED(CanUseAzureAlias_not_supported)***:Empty (0.23s)
40:R53_ALIAS2_***SKIPPED(CanUseRoute53Alias_not_supported)***:Empty (0.20s)
41:R53_ALIAS_ORDER_***SKIPPED(CanUseRoute53Alias_not_supported)***:Empty (0.20s)
42:R53_ALIAS_CNAME_***SKIPPED(CanUseRoute53Alias_not_supported)***:Empty (0.20s)
43:R53_ALIAS_Loop_***SKIPPED(CanUseRoute53Alias_not_supported)***:Empty (0.20s)
44:R53_alias_pre-existing_***SKIPPED(CanUseRoute53Alias_not_supported)***:Empty (0.18s)
45:CF_REDIRECT_***SKIPPED(disabled_by_only)***:Empty (0.23s)
46:CF_PROXY_A_create_***SKIPPED(disabled_by_only)***:Empty (0.19s)
47:CF_PROXY_A_off_to_X_***SKIPPED(disabled_by_only)***:Empty (0.19s)
48:CF_PROXY_A_on_to_X_***SKIPPED(disabled_by_only)***:Empty (0.18s)
49:CF_PROXY_A_full1_to_X_***SKIPPED(disabled_by_only)***:Empty (0.18s)
50:CF_PROXY_A_full2_to_X_***SKIPPED(disabled_by_only)***:Empty (0.18s)
51:CF_PROXY_CNAME_create_***SKIPPED(disabled_by_only)***:Empty (0.29s)
52:CF_PROXY_CNAME_off_to_X_***SKIPPED(disabled_by_only)***:Empty (0.20s)
53:CF_PROXY_CNAME_on_to_X_***SKIPPED(disabled_by_only)***:Empty (0.19s)
54:CF_PROXY_CNAME_full_to_X_***SKIPPED(disabled_by_only)***:Empty (0.22s)
55:CF_WORKER_ROUTE_***SKIPPED(disabled_by_only)***:Empty (0.19s)
56:NS1_URLFWD_tests_***SKIPPED(disabled_by_only)***:Empty (0.23s)
57:IGNORE_main_***SKIPPED(test_for_diff2_only)***:Empty (0.20s)
58:IGNORE_apex_***SKIPPED(test_for_diff2_only)***:Empty (0.20s)
59:IGNORE_NAME_function_***SKIPPED(test_for_diff2_only)***:Empty (0.20s)
60:IGNORE_NAME_apex_***SKIPPED(test_for_diff2_only)***:Empty (0.19s)
62:IGNORE_TARGET_function_CNAME*:Create_some_records (0.20s)
63:IGNORE_TARGET_function_CNAME**:Create_some_records (0.20s)
64:IGNORE_TARGET_b2285_***SKIPPED(test_for_diff2_only)***:Empty (0.20s)
65:structured_TXT_***SKIPPED(disabled_by_only)***:Empty (0.21s)
66:structured_TXT_as_native_records_***SKIPPED(disabled_by_only)***:Empty (0.19s)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: p3 - LowType: Questionclosed_staleClosed. Idle for more than 6 months. Please feel free to re-open to bring it back to life

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions