From d405ce60260f2aee4cc386d57725328962ec9e42 Mon Sep 17 00:00:00 2001 From: michiomochi Date: Wed, 17 Jul 2024 15:39:32 +0900 Subject: [PATCH] Revive testing.go --- testing.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 testing.go diff --git a/testing.go b/testing.go new file mode 100644 index 0000000..355111c --- /dev/null +++ b/testing.go @@ -0,0 +1,15 @@ +package qg + +import "github.com/jackc/pgx/v5/pgxpool" + +// // TestInjectJobConn injects *pgxpool.Conn to Job +func TestInjectJobConn(j *Job, conn *pgxpool.Conn) *Job { + j.conn = conn + return j +} + +// TestInjectJobTx injects tx to Job +func TestInjectJobTx(j *Job, tx Txer) *Job { + j.tx = tx + return j +}