Skip to content

Commit d7bf1f1

Browse files
committed
refactor: remove commented out test code
Remove commented TestPgxEncryptedMapDate function from golang integration tests
1 parent 51e1d07 commit d7bf1f1

File tree

1 file changed

+0
-54
lines changed

1 file changed

+0
-54
lines changed

tests/integration/golang/pgx_test.go

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -220,57 +220,3 @@ func TestPgxInsertEncryptedWithDomainTypeAndReturning(t *testing.T) {
220220
}
221221
}
222222

223-
/*
224-
func TestPgxEncryptedMapDate(t *testing.T) {
225-
conn := setupPgxConnection(t)
226-
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
227-
defer cancel()
228-
229-
column := "encrypted_date"
230-
dates := []time.Time{
231-
time.Date(1, 1, 1, 0, 0, 0, 0, time.UTC),
232-
time.Date(1000, 1, 1, 0, 0, 0, 0, time.UTC),
233-
time.Date(1600, 1, 1, 0, 0, 0, 0, time.UTC),
234-
time.Date(1700, 1, 1, 0, 0, 0, 0, time.UTC),
235-
time.Date(1800, 1, 1, 0, 0, 0, 0, time.UTC),
236-
time.Date(1900, 1, 1, 0, 0, 0, 0, time.UTC),
237-
time.Date(1990, 1, 1, 0, 0, 0, 0, time.UTC),
238-
time.Date(1999, 12, 31, 0, 0, 0, 0, time.UTC),
239-
time.Date(2000, 1, 1, 0, 0, 0, 0, time.UTC),
240-
time.Date(2001, 1, 2, 0, 0, 0, 0, time.UTC),
241-
time.Date(2004, 2, 29, 0, 0, 0, 0, time.UTC),
242-
time.Date(2013, 7, 4, 0, 0, 0, 0, time.UTC),
243-
time.Date(2013, 12, 25, 0, 0, 0, 0, time.UTC),
244-
time.Date(2029, 1, 1, 0, 0, 0, 0, time.UTC),
245-
time.Date(2081, 1, 1, 0, 0, 0, 0, time.UTC),
246-
time.Date(2096, 2, 29, 0, 0, 0, 0, time.UTC),
247-
time.Date(2550, 1, 1, 0, 0, 0, 0, time.UTC),
248-
time.Date(9999, 12, 31, 0, 0, 0, 0, time.UTC),
249-
}
250-
insertStmt := fmt.Sprintf(`INSERT INTO encrypted (id, %s) VALUES ($1, $2)`, column)
251-
selectStmt := fmt.Sprintf(`SELECT id, %s FROM encrypted WHERE id=$1`, column)
252-
253-
for _, value := range dates {
254-
t.Run(value.String(), func(t *testing.T) {
255-
for _, mode := range modes {
256-
id := rand.Int()
257-
t.Run(mode.String(), func(t *testing.T) {
258-
t.Run("insert", func(t *testing.T) {
259-
_, err := conn.Exec(ctx, insertStmt, mode, id, value)
260-
require.NoError(t, err)
261-
})
262-
263-
t.Run("select", func(t *testing.T) {
264-
var rid int
265-
var rv time.Time
266-
err := conn.QueryRow(context.Background(), selectStmt, mode, id).Scan(&rid, &rv)
267-
require.NoError(t, err)
268-
require.Equal(t, id, rid)
269-
require.Equal(t, value, rv)
270-
})
271-
})
272-
}
273-
})
274-
}
275-
}
276-
*/

0 commit comments

Comments
 (0)