Skip to content

Commit 9d0cd24

Browse files
authored
fix: test on CI (#2119)
1 parent fac4019 commit 9d0cd24

File tree

8 files changed

+51
-51
lines changed

8 files changed

+51
-51
lines changed

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
env:
1414
GO_VERSION: stable
15-
HUGO_VERSION: ${{vars.HUGO_VERSION}}
15+
HUGO_VERSION: 0.117.0
1616
CGO_ENABLED: 0
1717

1818
steps:

.github/workflows/pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ jobs:
4646
golangci-lint --version
4747
4848
- name: Install Pebble
49-
run: go install github.com/letsencrypt/pebble/v2/cmd/pebble@main
49+
run: go install github.com/letsencrypt/pebble/v2/cmd/pebble@3fe019bbc0a41ed16e2fee31592bb91751acaa47
5050

5151
- name: Install challtestsrv
52-
run: go install github.com/letsencrypt/pebble/v2/cmd/pebble-challtestsrv@main
52+
run: go install github.com/letsencrypt/pebble/v2/cmd/pebble-challtestsrv@3fe019bbc0a41ed16e2fee31592bb91751acaa47
5353

5454
- name: Set up a Memcached server
5555
uses: niden/actions-memcached@v7

challenge/dns01/fqdn_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ func TestToFqdn(t *testing.T) {
1414
}{
1515
{
1616
desc: "simple",
17-
domain: "foo.bar.com",
18-
expected: "foo.bar.com.",
17+
domain: "foo.example.com",
18+
expected: "foo.example.com.",
1919
},
2020
{
2121
desc: "already FQDN",
22-
domain: "foo.bar.com.",
23-
expected: "foo.bar.com.",
22+
domain: "foo.example.com.",
23+
expected: "foo.example.com.",
2424
},
2525
}
2626

@@ -43,13 +43,13 @@ func TestUnFqdn(t *testing.T) {
4343
}{
4444
{
4545
desc: "simple",
46-
fqdn: "foo.bar.com.",
47-
expected: "foo.bar.com",
46+
fqdn: "foo.example.",
47+
expected: "foo.example",
4848
},
4949
{
5050
desc: "already domain",
51-
fqdn: "foo.bar.com",
52-
expected: "foo.bar.com",
51+
fqdn: "foo.example",
52+
expected: "foo.example",
5353
},
5454
}
5555

providers/dns/cloudns/internal/client_test.go

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -382,62 +382,62 @@ func TestClient_AddTxtRecord(t *testing.T) {
382382
{
383383
desc: "sub-zone",
384384
authID: "myAuthID",
385-
zoneName: "bar.com",
386-
authFQDN: "_acme-challenge.foo.bar.com.",
385+
zoneName: "example.com",
386+
authFQDN: "_acme-challenge.foo.example.com.",
387387
value: "txtTXTtxtTXTtxtTXTtxtTXT",
388388
ttl: 60,
389389
apiResponse: `{"status":"Success","statusDescription":"The record was added successfully."}`,
390390
expected: expected{
391-
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=bar.com&host=_acme-challenge.foo&record=txtTXTtxtTXTtxtTXTtxtTXT&record-type=TXT&ttl=60`,
391+
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=example.com&host=_acme-challenge.foo&record=txtTXTtxtTXTtxtTXTtxtTXT&record-type=TXT&ttl=60`,
392392
},
393393
},
394394
{
395395
desc: "main zone (authID)",
396396
authID: "myAuthID",
397-
zoneName: "bar.com",
398-
authFQDN: "_acme-challenge.bar.com.",
397+
zoneName: "example.com",
398+
authFQDN: "_acme-challenge.example.com.",
399399
value: "TXTtxtTXTtxtTXTtxtTXTtxt",
400400
ttl: 60,
401401
apiResponse: `{"status":"Success","statusDescription":"The record was added successfully."}`,
402402
expected: expected{
403-
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=bar.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=60`,
403+
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=example.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=60`,
404404
},
405405
},
406406
{
407407
desc: "main zone (subAuthID)",
408408
subAuthID: "mySubAuthID",
409-
zoneName: "bar.com",
410-
authFQDN: "_acme-challenge.bar.com.",
409+
zoneName: "example.com",
410+
authFQDN: "_acme-challenge.example.com.",
411411
value: "TXTtxtTXTtxtTXTtxtTXTtxt",
412412
ttl: 60,
413413
apiResponse: `{"status":"Success","statusDescription":"The record was added successfully."}`,
414414
expected: expected{
415-
query: `auth-password=myAuthPassword&domain-name=bar.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&sub-auth-id=mySubAuthID&ttl=60`,
415+
query: `auth-password=myAuthPassword&domain-name=example.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&sub-auth-id=mySubAuthID&ttl=60`,
416416
},
417417
},
418418
{
419419
desc: "invalid status",
420420
authID: "myAuthID",
421-
zoneName: "bar.com",
422-
authFQDN: "_acme-challenge.bar.com.",
421+
zoneName: "example.com",
422+
authFQDN: "_acme-challenge.example.com.",
423423
value: "TXTtxtTXTtxtTXTtxtTXTtxt",
424424
ttl: 120,
425425
apiResponse: `{"status":"Failed","statusDescription":"Invalid TTL. Choose from the list of the values we support."}`,
426426
expected: expected{
427-
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=bar.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=300`,
427+
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=example.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=300`,
428428
errorMsg: "failed to add TXT record: Failed Invalid TTL. Choose from the list of the values we support.",
429429
},
430430
},
431431
{
432432
desc: "invalid json response",
433433
authID: "myAuthID",
434-
zoneName: "bar.com",
435-
authFQDN: "_acme-challenge.bar.com.",
434+
zoneName: "example.com",
435+
authFQDN: "_acme-challenge.example.com.",
436436
value: "TXTtxtTXTtxtTXTtxtTXTtxt",
437437
ttl: 120,
438438
apiResponse: `[{}]`,
439439
expected: expected{
440-
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=bar.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=300`,
440+
query: `auth-id=myAuthID&auth-password=myAuthPassword&domain-name=example.com&host=_acme-challenge&record=TXTtxtTXTtxtTXTtxtTXTtxt&record-type=TXT&ttl=300`,
441441
errorMsg: "unable to unmarshal response: [status code: 200] body: [{}] error: json: cannot unmarshal array into Go value of type internal.apiResponse",
442442
},
443443
},

providers/dns/cloudxns/internal/client_test.go

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,23 @@ func TestClient_GetDomainInformation(t *testing.T) {
8181
}{
8282
{
8383
desc: "domain found",
84-
fqdn: "_acme-challenge.foo.com.",
84+
fqdn: "_acme-challenge.example.org.",
8585
response: &apiResponse{
8686
Code: 1,
8787
},
8888
data: []Data{
8989
{
9090
ID: "1",
91-
Domain: "bar.com.",
91+
Domain: "example.com.",
9292
},
9393
{
9494
ID: "2",
95-
Domain: "foo.com.",
95+
Domain: "example.org.",
9696
},
9797
},
9898
expected: result{domain: &Data{
9999
ID: "2",
100-
Domain: "foo.com.",
100+
Domain: "example.org.",
101101
}},
102102
},
103103
{
@@ -109,11 +109,11 @@ func TestClient_GetDomainInformation(t *testing.T) {
109109
data: []Data{
110110
{
111111
ID: "5",
112-
Domain: "bar.com.",
112+
Domain: "example.com.",
113113
},
114114
{
115115
ID: "6",
116-
Domain: "foo.com.",
116+
Domain: "example.org.",
117117
},
118118
},
119119
expected: result{error: true},
@@ -152,13 +152,13 @@ func TestClient_FindTxtRecord(t *testing.T) {
152152
}{
153153
{
154154
desc: "record found",
155-
fqdn: "_acme-challenge.foo.com.",
155+
fqdn: "_acme-challenge.example.org.",
156156
zoneID: "test-zone",
157157
txtRecords: []TXTRecord{
158158
{
159159
ID: 1,
160160
RecordID: "Record-A",
161-
Host: "_acme-challenge.foo.com",
161+
Host: "_acme-challenge.example.org",
162162
Value: "txtTXTtxtTXTtxtTXTtxtTXT",
163163
Type: "TXT",
164164
LineID: 6,
@@ -167,7 +167,7 @@ func TestClient_FindTxtRecord(t *testing.T) {
167167
{
168168
ID: 2,
169169
RecordID: "Record-B",
170-
Host: "_acme-challenge.bar.com",
170+
Host: "_acme-challenge.example.com",
171171
Value: "TXTtxtTXTtxtTXTtxtTXTtxt",
172172
Type: "TXT",
173173
LineID: 6,
@@ -181,7 +181,7 @@ func TestClient_FindTxtRecord(t *testing.T) {
181181
txtRecord: &TXTRecord{
182182
ID: 1,
183183
RecordID: "Record-A",
184-
Host: "_acme-challenge.foo.com",
184+
Host: "_acme-challenge.example.org",
185185
Value: "txtTXTtxtTXTtxtTXTtxtTXT",
186186
Type: "TXT",
187187
LineID: 6,
@@ -197,7 +197,7 @@ func TestClient_FindTxtRecord(t *testing.T) {
197197
{
198198
ID: 1,
199199
RecordID: "Record-A",
200-
Host: "_acme-challenge.foo.com",
200+
Host: "_acme-challenge.example.org",
201201
Value: "txtTXTtxtTXTtxtTXTtxtTXT",
202202
Type: "TXT",
203203
LineID: 6,
@@ -206,7 +206,7 @@ func TestClient_FindTxtRecord(t *testing.T) {
206206
{
207207
ID: 2,
208208
RecordID: "Record-B",
209-
Host: "_acme-challenge.bar.com",
209+
Host: "_acme-challenge.example.com",
210210
Value: "TXTtxtTXTtxtTXTtxtTXTtxt",
211211
Type: "TXT",
212212
LineID: 6,
@@ -249,9 +249,9 @@ func TestClient_AddTxtRecord(t *testing.T) {
249249
desc: "sub-domain",
250250
domain: &Data{
251251
ID: "1",
252-
Domain: "bar.com.",
252+
Domain: "example.com.",
253253
},
254-
fqdn: "_acme-challenge.foo.bar.com.",
254+
fqdn: "_acme-challenge.foo.example.com.",
255255
value: "txtTXTtxtTXTtxtTXTtxtTXT",
256256
ttl: 30,
257257
expected: `{"domain_id":1,"host":"_acme-challenge.foo","value":"txtTXTtxtTXTtxtTXTtxtTXT","type":"TXT","line_id":"1","ttl":"30"}`,
@@ -260,9 +260,9 @@ func TestClient_AddTxtRecord(t *testing.T) {
260260
desc: "main domain",
261261
domain: &Data{
262262
ID: "2",
263-
Domain: "bar.com.",
263+
Domain: "example.com.",
264264
},
265-
fqdn: "_acme-challenge.bar.com.",
265+
fqdn: "_acme-challenge.example.com.",
266266
value: "TXTtxtTXTtxtTXTtxtTXTtxt",
267267
ttl: 30,
268268
expected: `{"domain_id":2,"host":"_acme-challenge","value":"TXTtxtTXTtxtTXTtxtTXTtxt","type":"TXT","line_id":"1","ttl":"30"}`,

providers/dns/edgedns/edgedns_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,13 +158,13 @@ func TestDNSProvider_findZone(t *testing.T) {
158158
}{
159159
{
160160
desc: "Extract root record name",
161-
domain: "bar.com.",
162-
expected: "bar.com",
161+
domain: "example.com.",
162+
expected: "example.com",
163163
},
164164
{
165165
desc: "Extract sub record name",
166-
domain: "foo.bar.com.",
167-
expected: "bar.com",
166+
domain: "foo.example.com.",
167+
expected: "example.com",
168168
},
169169
}
170170

providers/dns/exoscale/exoscale_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ func TestDNSProvider_FindZoneAndRecordName(t *testing.T) {
144144
}{
145145
{
146146
desc: "Extract root record name",
147-
fqdn: "_acme-challenge.bar.com.",
147+
fqdn: "_acme-challenge.example.com.",
148148
expected: expected{
149-
zone: "bar.com",
149+
zone: "example.com",
150150
recordName: "_acme-challenge",
151151
},
152152
},
153153
{
154154
desc: "Extract sub record name",
155-
fqdn: "_acme-challenge.foo.bar.com.",
155+
fqdn: "_acme-challenge.foo.example.com.",
156156
expected: expected{
157-
zone: "bar.com",
157+
zone: "example.com",
158158
recordName: "_acme-challenge.foo",
159159
},
160160
},

providers/dns/linode/linode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ func TestDNSProvider_Present(t *testing.T) {
197197
Page: 1,
198198
},
199199
Data: []linodego.Domain{{
200-
Domain: "foobar.com",
200+
Domain: "example.com",
201201
ID: 1234,
202202
}},
203203
},

0 commit comments

Comments
 (0)