| 1 | package internalscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ |
| 2 | |
| 3 | import ( |
| 4 | "net/http/httptestscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/" |
| 5 | "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/" |
| 6 | |
| 7 | "github.com/go-acme/lego/v4/platform/tester/servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/" |
| 8 | "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/" |
| 9 | "github.com/stretchr/testify/requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/" |
| 10 | ) |
| 11 | |
| 12 | func mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().() *servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.Builderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#[*Clientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#] { |
| 13 | return servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.NewBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/NewBuilder().[*Clientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#]( |
| 14 | func(server *httptestscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/.Serverscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/Server#) (*Clientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#, error) { |
| 15 | client, err := NewClientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/NewClient().("user", "secret") |
| 16 | if err != nil { |
| 17 | return nil, err |
| 18 | } |
| 19 | |
| 20 | client.HTTPClientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#HTTPClient. = server.Clientscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/Server#Client().() |
| 21 | client.baseURLscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#baseURL. = server.URLscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/Server#URL. |
| 22 | |
| 23 | return client, nil |
| 24 | }, |
| 25 | servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.CheckHeaderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/CheckHeader().(). |
| 26 | WithContentTypeFromURLEncodedscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/HeaderLink#WithContentTypeFromURLEncoded().()) |
| 27 | } |
| 28 | |
| 29 | func TestClient_StatusDomainscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_StatusDomain().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 30 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 31 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("status-domain.json"), |
| 32 | servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.CheckFormscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/CheckForm().().Strictscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#Strict().(). |
| 33 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("signature", "[a-z0-9]+"). |
| 34 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("timestamp", `\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z`). |
| 35 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("command", "statusDomain"). |
| 36 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("user", "user"). |
| 37 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("domain", "example.com"), |
| 38 | ). |
| 39 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 40 | |
| 41 | domain, err := client.StatusDomainscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#StatusDomain().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com") |
| 42 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/NoError().(t, err) |
| 43 | |
| 44 | expected := &StatusResponsescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#{ |
| 45 | RenewalModescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#RenewalMode.: []string{"DEFAULT"}, |
| 46 | Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Status.: []string{"clientTransferProhibited"}, |
| 47 | TransferLockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#TransferLock.: []int{1}, |
| 48 | Registrarscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Registrar.: []string{"brandit"}, |
| 49 | PaidUntilDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#PaidUntilDate.: []string{"2021-12-15 05:00:00.0"}, |
| 50 | Nameserverscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Nameserver.: []string{"NS1.RRPPROXY.NET", "NS2.RRPPROXY.NET"}, |
| 51 | RegistrationExpirationDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#RegistrationExpirationDate.: []string{"2021-12-15 05:00:00.0"}, |
| 52 | Domainscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Domain.: []string{"example.com"}, |
| 53 | RenewalDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#RenewalDate.: []string{"2024-01-19 05:00:00.0"}, |
| 54 | UpdatedDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#UpdatedDate.: []string{"2022-12-16 08:01:27.0"}, |
| 55 | BillingContactscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#BillingContact.: []string{"example"}, |
| 56 | XDomainRoIDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#XDomainRoID.: []string{"example"}, |
| 57 | AdminContactscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#AdminContact.: []string{"example"}, |
| 58 | TechContactscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#TechContact.: []string{"example"}, |
| 59 | DomainIDNscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#DomainIDN.: []string{"example.com"}, |
| 60 | CreatedDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#CreatedDate.: []string{"2016-12-16 05:00:00.0"}, |
| 61 | RegistrarTransferDatescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#RegistrarTransferDate.: []string{"2021-12-09 05:17:42.0"}, |
| 62 | Zonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Zone.: []string{"com"}, |
| 63 | Authscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#Auth.: []string{"example"}, |
| 64 | UpdatedByscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#UpdatedBy.: []string{"example"}, |
| 65 | RoIDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#RoID.: []string{"example"}, |
| 66 | OwnerContactscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#OwnerContact.: []string{"example"}, |
| 67 | CreatedByscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#CreatedBy.: []string{"example"}, |
| 68 | TransferModescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/StatusResponse#TransferMode.: []string{"auto"}, |
| 69 | } |
| 70 | |
| 71 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, expected, domain) |
| 72 | } |
| 73 | |
| 74 | func TestClient_StatusDomain_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_StatusDomain_error().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 75 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 76 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("error.json")). |
| 77 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 78 | |
| 79 | _, err := client.StatusDomainscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#StatusDomain().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com") |
| 80 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/ErrorIs().(t, err, APIErrorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#{Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Code.: 402, Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Status.: "error", Messagescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Message.: "Invalid user."}) |
| 81 | } |
| 82 | |
| 83 | func TestClient_ListRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_ListRecords().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 84 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 85 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("list-records.json"), |
| 86 | servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.CheckFormscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/CheckForm().().Strictscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#Strict().(). |
| 87 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("signature", "[a-z0-9]+"). |
| 88 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("timestamp", `\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z`). |
| 89 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("account", "example"). |
| 90 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("command", "listDNSRR"). |
| 91 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("user", "user"). |
| 92 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("dnszone", "example.com"), |
| 93 | ). |
| 94 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 95 | |
| 96 | resp, err := client.ListRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#ListRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example", "example.com") |
| 97 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/NoError().(t, err) |
| 98 | |
| 99 | expected := &ListRecordsResponsescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#{ |
| 100 | Limitscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#Limit.: []int{100}, |
| 101 | Columnscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#Column.: []string{"rr"}, |
| 102 | Countscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#Count.: []int{1}, |
| 103 | Firstscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#First.: []int{0}, |
| 104 | Totalscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#Total.: []int{1}, |
| 105 | RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#RR.: []string{"example.com. 600 IN TXT txttxttxt"}, |
| 106 | Lastscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/ListRecordsResponse#Last.: []int{0}, |
| 107 | } |
| 108 | |
| 109 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, expected, resp) |
| 110 | } |
| 111 | |
| 112 | func TestClient_ListRecords_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_ListRecords_error().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 113 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 114 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("error.json")). |
| 115 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 116 | |
| 117 | _, err := client.ListRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#ListRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example", "example.com") |
| 118 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/ErrorIs().(t, err, APIErrorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#{Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Code.: 402, Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Status.: "error", Messagescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Message.: "Invalid user."}) |
| 119 | } |
| 120 | |
| 121 | func TestClient_AddRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_AddRecord().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 122 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 123 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("add-record.json"), |
| 124 | servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.CheckFormscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/CheckForm().().Strictscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#Strict().(). |
| 125 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("signature", "[a-z0-9]+"). |
| 126 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("timestamp", `\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z`). |
| 127 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("account", "test"). |
| 128 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("command", "addDNSRR"). |
| 129 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("key", "2565"). |
| 130 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("user", "user"). |
| 131 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("rrdata", "example.com 600 IN TXT txttxttxt"). |
| 132 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("dnszone", "example.com"), |
| 133 | ). |
| 134 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 135 | |
| 136 | testRecord := Recordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#{ |
| 137 | IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#ID.: 2565, |
| 138 | Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Type.: "TXT", |
| 139 | Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Name.: "example.com", |
| 140 | Contentscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Content.: "txttxttxt", |
| 141 | TTLscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#TTL.: 600, |
| 142 | } |
| 143 | resp, err := client.AddRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#AddRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com", "test", "2565", testRecord) |
| 144 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/NoError().(t, err) |
| 145 | |
| 146 | expected := &AddRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#{ |
| 147 | Responsescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#Response.: AddRecordResponsescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecordResponse#{ |
| 148 | ZoneTypescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecordResponse#ZoneType.: []string{"com"}, |
| 149 | Signedscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecordResponse#Signed.: []int{1}, |
| 150 | }, |
| 151 | Recordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#Record.: "example.com 600 IN TXT txttxttxt", |
| 152 | Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#Code.: 200, |
| 153 | Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#Status.: "success", |
| 154 | Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/AddRecord#Error.: "", |
| 155 | } |
| 156 | |
| 157 | assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/.Equalscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/Equal().(t, expected, resp) |
| 158 | } |
| 159 | |
| 160 | func TestClient_AddRecord_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_AddRecord_error().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 161 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 162 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("error.json")). |
| 163 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 164 | |
| 165 | testRecord := Recordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#{ |
| 166 | IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#ID.: 2565, |
| 167 | Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Type.: "TXT", |
| 168 | Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Name.: "example.com", |
| 169 | Contentscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#Content.: "txttxttxt", |
| 170 | TTLscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Record#TTL.: 600, |
| 171 | } |
| 172 | |
| 173 | _, err := client.AddRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#AddRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com", "test", "2565", testRecord) |
| 174 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/ErrorIs().(t, err, APIErrorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#{Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Code.: 402, Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Status.: "error", Messagescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Message.: "Invalid user."}) |
| 175 | } |
| 176 | |
| 177 | func TestClient_DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_DeleteRecord().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 178 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 179 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("delete-record.json"), |
| 180 | servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.CheckFormscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/CheckForm().().Strictscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#Strict().(). |
| 181 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("signature", "[a-z0-9]+"). |
| 182 | WithRegexpscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#WithRegexp().("timestamp", `\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}Z`). |
| 183 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("account", "test"). |
| 184 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("command", "deleteDNSRR"). |
| 185 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("key", "2374"). |
| 186 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("user", "user"). |
| 187 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("rrdata", "example.com 600 IN TXT txttxttxt"). |
| 188 | Withscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/FormLink#With().("dnszone", "example.com"), |
| 189 | ). |
| 190 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 191 | |
| 192 | err := client.DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#DeleteRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com", "test", "example.com 600 IN TXT txttxttxt", "2374") |
| 193 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.NoErrorscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/NoError().(t, err) |
| 194 | } |
| 195 | |
| 196 | func TestClient_DeleteRecord_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/TestClient_DeleteRecord_error().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) { |
| 197 | client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/mockBuilder().(). |
| 198 | Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /", servermockscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/.ResponseFromFixturescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/ResponseFromFixture().("error.json")). |
| 199 | Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t) |
| 200 | |
| 201 | err := client.DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/Client#DeleteRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "example.com", "test", "example.com 600 IN TXT txttxttxt", "2374") |
| 202 | requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/.ErrorIsscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/ErrorIs().(t, err, APIErrorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#{Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Code.: 402, Statusscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Status.: "error", Messagescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/brandit/internal`/APIError#Message.: "Invalid user."}) |
| 203 | } |