@@ -135,6 +135,10 @@ func TestLinodeConvertRecordType(t *testing.T) {
135
135
require .NoError (t , err )
136
136
assert .Equal (t , linodego .RecordTypeSRV , record )
137
137
138
+ record , err = convertRecordType ("NS" )
139
+ require .NoError (t , err )
140
+ assert .Equal (t , linodego .RecordTypeNS , record )
141
+
138
142
_ , err = convertRecordType ("INVALID" )
139
143
require .Error (t , err )
140
144
}
@@ -333,7 +337,7 @@ func TestLinodeApplyChanges(t *testing.T) {
333
337
11 ,
334
338
linodego.DomainRecordUpdateOptions {
335
339
Type : "A" , Name : "" , Target : "targetFoo" ,
336
- Priority : getPriority (), Weight : getWeight (), Port : getPort (), TTLSec : 300 ,
340
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (), TTLSec : 300 ,
337
341
},
338
342
).Return (& linodego.DomainRecord {}, nil ).Once ()
339
343
@@ -343,7 +347,7 @@ func TestLinodeApplyChanges(t *testing.T) {
343
347
2 ,
344
348
linodego.DomainRecordCreateOptions {
345
349
Type : "A" , Name : "create" , Target : "targetBar" ,
346
- Priority : getPriority (), Weight : getWeight (), Port : getPort (), TTLSec : 0 ,
350
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (), TTLSec : 0 ,
347
351
},
348
352
).Return (& linodego.DomainRecord {}, nil ).Once ()
349
353
@@ -353,7 +357,7 @@ func TestLinodeApplyChanges(t *testing.T) {
353
357
2 ,
354
358
linodego.DomainRecordCreateOptions {
355
359
Type : "A" , Name : "" , Target : "targetBar" ,
356
- Priority : getPriority (), Weight : getWeight (), Port : getPort (), TTLSec : 0 ,
360
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (), TTLSec : 0 ,
357
361
},
358
362
).Return (& linodego.DomainRecord {}, nil ).Once ()
359
363
@@ -423,7 +427,7 @@ func TestLinodeApplyChangesTargetAdded(t *testing.T) {
423
427
11 ,
424
428
linodego.DomainRecordUpdateOptions {
425
429
Type : "A" , Name : "" , Target : "targetA" ,
426
- Priority : getPriority (), Weight : getWeight (), Port : getPort (),
430
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (),
427
431
},
428
432
).Return (& linodego.DomainRecord {}, nil ).Once ()
429
433
@@ -433,7 +437,7 @@ func TestLinodeApplyChangesTargetAdded(t *testing.T) {
433
437
1 ,
434
438
linodego.DomainRecordCreateOptions {
435
439
Type : "A" , Name : "" , Target : "targetB" ,
436
- Priority : getPriority (), Weight : getWeight (), Port : getPort (),
440
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (),
437
441
},
438
442
).Return (& linodego.DomainRecord {}, nil ).Once ()
439
443
@@ -482,7 +486,7 @@ func TestLinodeApplyChangesTargetRemoved(t *testing.T) {
482
486
12 ,
483
487
linodego.DomainRecordUpdateOptions {
484
488
Type : "A" , Name : "" , Target : "targetB" ,
485
- Priority : getPriority (), Weight : getWeight (), Port : getPort (),
489
+ Priority : getPriority (), Weight : getWeight (linodego . RecordTypeA ), Port : getPort (),
486
490
},
487
491
).Return (& linodego.DomainRecord {}, nil ).Once ()
488
492
0 commit comments