Skip to content

Commit b720fbb

Browse files
committed
feat(domain): fix gofumpt formatting in TEM integration test
1 parent 4fde9b4 commit b720fbb

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

internal/services/domain/record.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ func ResourceRecord() *schema.Resource {
6666
ForceNew: true,
6767
Optional: true,
6868
StateFunc: func(val any) string {
69-
// This function normalizes the name before storing it in state
70-
// It converts FQDN (e.g., "_dmarc.example.com.") to relative format (e.g., "_dmarc")
71-
value := val.(string)
7269
if value == "@" || value == "" {
7370
return ""
7471
}
@@ -259,7 +256,6 @@ func resourceRecordCreate(ctx context.Context, d *schema.ResourceData, m any) di
259256
geoIP, okGeoIP := d.GetOk("geo_ip")
260257
recordType := domain.RecordType(d.Get("type").(string))
261258
recordData := d.Get("data").(string)
262-
// Normalize the record name to relative format (handles FQDN with trailing dot)
263259
recordName := normalizeRecordName(d.Get("name").(string), dnsZone)
264260
record := &domain.Record{
265261
Data: recordData,
@@ -373,7 +369,6 @@ func resourceDomainRecordRead(ctx context.Context, d *schema.ResourceData, m any
373369
}
374370

375371
idRecord := locality.ExpandID(d.Id())
376-
// Normalize the record name to relative format (handles FQDN with trailing dot)
377372
recordName := normalizeRecordName(d.Get("name").(string), dnsZone)
378373

379374
res, err := domainAPI.ListDNSZoneRecords(&domain.ListDNSZoneRecordsRequest{
@@ -454,7 +449,6 @@ func resourceDomainRecordUpdate(ctx context.Context, d *schema.ResourceData, m a
454449
}
455450

456451
geoIP, okGeoIP := d.GetOk("geo_ip")
457-
// Normalize the record name to relative format (handles FQDN with trailing dot)
458452
recordName := normalizeRecordName(d.Get("name").(string), dnsZone)
459453
record := &domain.Record{
460454
Name: recordName,

internal/services/domain/record_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@ func TestAccDomainRecord_NameDiffSuppress(t *testing.T) {
905905
),
906906
},
907907
{
908-
// Use FQDN format - should not cause replacement
909908
Config: fmt.Sprintf(`
910909
resource "scaleway_domain_record" "dmarc" {
911910
dns_zone = "%s"
@@ -937,7 +936,6 @@ func TestAccDomainRecord_TEMIntegration(t *testing.T) {
937936
CheckDestroy: testAccCheckDomainRecordDestroy(tt),
938937
Steps: []resource.TestStep{
939938
{
940-
941939
Config: fmt.Sprintf(`
942940
resource "scaleway_domain_record" "dmarc" {
943941
dns_zone = "%s"

0 commit comments

Comments
 (0)