Debian Codegraph @

providers/dns/nicru/internal/client_test.go

raw symbols SCIP
1 package internalscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/
2
3 import (
4 "net/http/httptestscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/"
5 "net/urlscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/"
6 "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/"
7
8 "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`/"
9 "github.com/stretchr/testify/assertscip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/assert`/"
10 "github.com/stretchr/testify/requirescip-go gomod github.com/stretchr/testify v1.11.1 `github.com/stretchr/testify/require`/"
11 )
12
13 func mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/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/nicru/internal`/Client#] {
14 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/nicru/internal`/Client#](
15 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/nicru/internal`/Client#, error) {
16 client, err := NewClientscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NewClient().(server.Clientscip-go gomod github.com/golang/go/src go1.25.0 `net/http/httptest`/Server#Client().())
17 if err != nil {
18 return nil, err
19 }
20
21 client.baseURLscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#baseURL., _ = urlscip-go gomod github.com/golang/go/src go1.25.0 `net/url`/.Parsescip-go gomod github.com/golang/go/src go1.25.0 `net/url`/Parse().(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 WithAcceptscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/HeaderLink#WithAccept().("text/xml"),
27 )
28 }
29
30 func TestClient_GetServicesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_GetServices().(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#) {
31 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
32 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /services", 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().("services_GET.xml")).
33 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
34
35 zones, err := client.GetServicesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#GetServices().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().())
36 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)
37
38 expected := []Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#{
39 {
40 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Admin.: "123/NIC-REG",
41 DomainsLimitscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#DomainsLimit.: "12",
42 DomainsNumscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#DomainsNum.: "5",
43 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Enable.: "true",
44 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#HasPrimary.: "false",
45 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Name.: "testservice",
46 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Payer.: "123/NIC-REG",
47 Tariffscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Tariff.: "Secondary L",
48 },
49 {
50 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Admin.: "123/NIC-REG",
51 DomainsLimitscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#DomainsLimit.: "150",
52 DomainsNumscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#DomainsNum.: "10",
53 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Enable.: "true",
54 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#HasPrimary.: "true",
55 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Name.: "myservice",
56 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Payer.: "123/NIC-REG",
57 Tariffscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#Tariff.: "DNS-master XXL",
58 RRLimitscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#RRLimit.: "7500",
59 RRNumscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Service#RRNum.: "1000",
60 },
61 }
62
63 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, zones)
64 }
65
66 func TestClient_ListZonesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_ListZones().(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#) {
67 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
68 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /zones", 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().("zones_all_GET.xml")).
69 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
70
71 zones, err := client.ListZonesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#ListZones().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().())
72 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)
73
74 expected := []Zonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#{
75 {
76 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
77 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
78 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
79 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
80 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227645",
81 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "тест.рф",
82 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "xn—e1aybc.xn--p1ai",
83 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
84 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
85 },
86 {
87 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
88 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
89 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
90 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
91 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227642",
92 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "example.ru",
93 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "example.ru",
94 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
95 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
96 },
97 {
98 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
99 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
100 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
101 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
102 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227643",
103 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "test.su",
104 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "test.su",
105 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
106 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
107 },
108 }
109
110 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, zones)
111 }
112
113 func TestClient_ListZones_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_ListZones_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#) {
114 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
115 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /zones", 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().("errors.xml")).
116 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
117
118 _, err := client.ListZonesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#ListZones().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().())
119 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
120 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
121 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
122 })
123 }
124
125 func TestClient_GetZonesByServicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_GetZonesByService().(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#) {
126 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
127 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /services/test/zones",
128 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().("zones_GET.xml")).
129 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
130
131 zones, err := client.GetZonesByServicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#GetZonesByService().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test")
132 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)
133
134 expected := []Zonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#{
135 {
136 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
137 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
138 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
139 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
140 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227645",
141 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "тест.рф",
142 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "xn—e1aybc.xn--p1ai",
143 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
144 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
145 },
146 {
147 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
148 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
149 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
150 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
151 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227642",
152 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "example.ru",
153 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "example.ru",
154 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
155 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
156 },
157 {
158 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
159 Enablescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Enable.: "true",
160 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "false",
161 HasPrimaryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasPrimary.: "true",
162 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "227643",
163 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "test.su",
164 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "test.su",
165 Payerscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Payer.: "123/NIC-REG",
166 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "myservice",
167 },
168 }
169
170 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, zones)
171 }
172
173 func TestClient_GetZonesByService_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_GetZonesByService_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#) {
174 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
175 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /services/test/zones",
176 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().("errors.xml")).
177 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
178
179 _, err := client.GetZonesByServicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#GetZonesByService().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test")
180 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
181 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
182 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
183 })
184 }
185
186 func TestClient_GetRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_GetRecords().(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#) {
187 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
188 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /services/test/zones/example.com./records",
189 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().("records_GET.xml")).
190 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
191
192 records, err := client.GetRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#GetRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.")
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 expected := []RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#{
196 {
197 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210074",
198 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
199 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
200 TTLscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#TTL.: "",
201 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "SOA",
202 SOAscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#SOA.: &SOAscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#{
203 MNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#MName.: &MNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/MName#{
204 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/MName#Name.: "ns3-l2.nic.ru.",
205 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/MName#IDNName.: "ns3-l2.nic.ru.",
206 },
207 RNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#RName.: &RNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RName#{
208 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RName#Name.: "dns.nic.ru.",
209 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RName#IDNName.: "dns.nic.ru.",
210 },
211 Serialscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#Serial.: "2011112002",
212 Refreshscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#Refresh.: "1440",
213 Retryscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#Retry.: "3600",
214 Expirescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#Expire.: "2592000",
215 Minimumscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/SOA#Minimum.: "600",
216 },
217 },
218 {
219 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210075",
220 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
221 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
222 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
223 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{
224 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns3-l2.nic.ru.",
225 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#IDNName.: "ns3- l2.nic.ru.",
226 },
227 },
228 {
229 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210076",
230 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
231 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
232 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
233 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{
234 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns4-l2.nic.ru.",
235 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#IDNName.: "ns4-l2.nic.ru.",
236 },
237 },
238 {
239 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210077",
240 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
241 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
242 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
243 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{
244 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns8-l2.nic.ru.",
245 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#IDNName.: "ns8- l2.nic.ru.",
246 },
247 },
248 }
249
250 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, records)
251 }
252
253 func TestClient_GetRecords_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_GetRecords_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#) {
254 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
255 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("GET /services/test/zones/example.com./records",
256 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().("errors.xml")).
257 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
258
259 _, err := client.GetRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#GetRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.")
260 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
261 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
262 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
263 })
264 }
265
266 func TestClient_AddRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/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#) {
267 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
268 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("PUT /services/test/zones/example.com./records",
269 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().("records_PUT.xml"),
270 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().().
271 WithContentTypescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/HeaderLink#WithContentType().("text/xml")).
272 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
273
274 rrs := []RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#{
275 {
276 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
277 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
278 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns4-l2.nic.ru."},
279 },
280 {
281 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
282 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
283 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns8-l2.nic.ru."},
284 },
285 }
286
287 response, err := client.AddRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#AddRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.", rrs)
288 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)
289
290 expected := []Zonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#{
291 {
292 Adminscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Admin.: "123/NIC-REG",
293 HasChangesscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#HasChanges.: "true",
294 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#ID.: "228095",
295 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#IDNName.: "test.ru",
296 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Name.: "test.ru",
297 Servicescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#Service.: "testservice",
298 RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Zone#RR.: []RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#{
299 {
300 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210076",
301 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
302 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
303 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
304 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{
305 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns4-l2.nic.ru.",
306 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#IDNName.: "ns4-l2.nic.ru.",
307 },
308 },
309 {
310 IDscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#ID.: "210077",
311 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
312 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#IDNName.: "@",
313 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
314 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{
315 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns8-l2.nic.ru.",
316 IDNNamescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#IDNName.: "ns8-l2.nic.ru.",
317 },
318 },
319 },
320 },
321 }
322
323 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, response)
324 }
325
326 func TestClient_AddRecord_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/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#) {
327 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
328 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("PUT /services/test/zones/example.com./records",
329 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().("errors.xml"),
330 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().().
331 WithContentTypescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/HeaderLink#WithContentType().("text/xml")).
332 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
333
334 rrs := []RRscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#{
335 {
336 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
337 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
338 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns4-l2.nic.ru."},
339 },
340 {
341 Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Name.: "@",
342 Typescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#Type.: "NS",
343 NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/RR#NS.: &NSscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#{Namescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/NS#Name.: "ns8-l2.nic.ru."},
344 },
345 }
346
347 _, err := client.AddRecordsscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#AddRecords().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.", rrs)
348 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
349 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
350 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
351 })
352 }
353
354 func TestClient_DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/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#) {
355 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
356 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("DELETE /services/test/zones/example.com./records/123",
357 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().("record_DELETE.xml")).
358 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
359
360 err := client.DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#DeleteRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.", "123")
361 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)
362 }
363
364 func TestClient_DeleteRecord_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/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#) {
365 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
366 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("DELETE /services/test/zones/example.com./records/123",
367 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().("errors.xml")).
368 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
369
370 err := client.DeleteRecordscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#DeleteRecord().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.", "123")
371 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
372 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
373 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
374 })
375 }
376
377 func TestClient_CommitZonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_CommitZone().(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#) {
378 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
379 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /services/test/zones/example.com./commit",
380 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().("commit_POST.xml")).
381 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
382
383 err := client.CommitZonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#CommitZone().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.")
384 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)
385 }
386
387 func TestClient_CommitZone_errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/TestClient_CommitZone_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#) {
388 client := mockBuilderscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/mockBuilder().().
389 Routescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Route().("POST /services/test/zones/example.com./commit",
390 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().("errors.xml")).
391 Buildscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/platform/tester/servermock`/Builder#Build().(t)
392
393 err := client.CommitZonescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Client#CommitZone().(t.Contextscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Context().(), "test", "example.com.")
394 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, Errorscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#{
395 Textscip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Text.: "Access token expired or not found",
396 Codescip-go gomod github.com/go-acme/lego/v4 . `github.com/go-acme/lego/v4/providers/dns/nicru/internal`/Error#Code.: "4097",
397 })
398 }