Skip to content

Commit 7adfce8

Browse files
committed
Remove old test
1 parent 7b7ec0a commit 7adfce8

File tree

2 files changed

+1
-65
lines changed

2 files changed

+1
-65
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- run: go build ./...
3232
- run: go build ./...
3333
working-directory: tests
34-
- run: go test ./...
34+
- run: go test --tags=postgres${{matrix.postgres}} ./...
3535
working-directory: tests
3636
env:
3737
PG_USER: postgres

tests/macaddr_test.go

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -67,67 +67,3 @@ func TestMacaddr(t *testing.T) {
6767
}
6868
})
6969
}
70-
71-
// https://www.postgresql.org/docs/current/datatype-net-types.html#DATATYPE-MACADDR8
72-
func TestMacaddr8(t *testing.T) {
73-
for _, addr := range []struct {
74-
input string
75-
output string
76-
}{
77-
{
78-
"08:00:2b:01:02:03:04:05",
79-
"08:00:2b:01:02:03:04:05",
80-
},
81-
{
82-
"08-00-2b-01-02-03-04-05",
83-
"08:00:2b:01:02:03:04:05",
84-
},
85-
{
86-
"08002b:0102030405",
87-
"08:00:2b:01:02:03:04:05",
88-
},
89-
{
90-
"08002b-0102030405",
91-
"08:00:2b:01:02:03:04:05",
92-
},
93-
{
94-
"0800.2b01.0203.0405",
95-
"08:00:2b:01:02:03:04:05",
96-
},
97-
{
98-
"0800-2b01-0203-0405",
99-
"08:00:2b:01:02:03:04:05",
100-
},
101-
{
102-
"08002b01:02030405",
103-
"08:00:2b:01:02:03:04:05",
104-
},
105-
{
106-
"08002b0102030405",
107-
"08:00:2b:01:02:03:04:05",
108-
},
109-
} {
110-
addr = addr
111-
t.Run(addr.input, func(t *testing.T) {
112-
var cidr pqtype.Macaddr
113-
if err := db.QueryRow(fmt.Sprintf(`SELECT '%s'::macaddr8`, addr.input)).Scan(&cidr); err != nil {
114-
t.Fatal(err)
115-
}
116-
if diff := cmp.Diff(true, cidr.Valid); diff != "" {
117-
t.Errorf("valid mismatch (-want +got):\n%s", diff)
118-
}
119-
if diff := cmp.Diff(addr.output, cidr.Addr.String()); diff != "" {
120-
t.Errorf("mismatch (-want +got):\n%s", diff)
121-
}
122-
})
123-
}
124-
t.Run("NULL", func(t *testing.T) {
125-
var cidr pqtype.Macaddr
126-
if err := db.QueryRow(fmt.Sprintf(`SELECT NULL::macaddr8`)).Scan(&cidr); err != nil {
127-
t.Fatal(err)
128-
}
129-
if diff := cmp.Diff(false, cidr.Valid); diff != "" {
130-
t.Errorf("valid mismatch (-want +got):\n%s", diff)
131-
}
132-
})
133-
}

0 commit comments

Comments
 (0)