From 788d2cd61cc05c3f2ed0c9d4fc60aabce17aec45 Mon Sep 17 00:00:00 2001 From: Jan Eitzinger Date: Fri, 5 May 2023 06:02:17 +0200 Subject: [PATCH] Fix repo tests --- internal/repository/job_test.go | 2 +- internal/repository/testdata/test.db | Bin 0 -> 81920 bytes internal/repository/user_test.go | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 internal/repository/testdata/test.db diff --git a/internal/repository/job_test.go b/internal/repository/job_test.go index 34a2df2..d74dad5 100644 --- a/internal/repository/job_test.go +++ b/internal/repository/job_test.go @@ -14,7 +14,7 @@ import ( func setup(t *testing.T) *JobRepository { log.Init("info", true) - dbfilepath := "../../test/test.db" + dbfilepath := "testdata/test.db" err := MigrateDB("sqlite3", dbfilepath) if err != nil { t.Fatal(err) diff --git a/internal/repository/testdata/test.db b/internal/repository/testdata/test.db new file mode 100644 index 0000000000000000000000000000000000000000..e2dd7de0e5ae7c07a7c68146bcfc4e12338a7119 GIT binary patch literal 81920 zcmeI5TWlLwdVoohx=^{$uA(T}#_@znR?=pqx$q`2owX&Ic9h7JEK<4DGA6^}h#Y$^ z^js`ygP`jK*~P*Sen=Ce58HiQH0Y*9w+{gdv_&3T6x#w_phb}seOLtPq6o5Sv)ydk zed&K@IMk53IgOmy&Oa78Gw1y0Kj(bsod2AEcu1GeEU1n`t(lfCIaE4wC=!iEj#E@5 z5;+X7d*BrucfmzGxPfytbiLc<;mD-;z+Lf7o zNAK(XgV?{uem^$b^Xr~Bc2n|Yguk2|>>n8(j(#WVNL5X7ZN(z5JLZ;)GnFD$nVDTE zQY3^L8%&V1A?XTrNwVaIWR3CJ>^QZwJb!v-`8n#T;&W7Ku|kzr78dBiL{qZub+c7Ow zrYuFWO~anM&;QDZ@ zS>{V8iqBHvNKyc5u|&eCF%sb=8J|z~jf@UO>tSUiR;|JNp`En(vEAC#+W6AleIpY? zQ8TOxGO-*-)k)csJ85eRw9Dp&h$PK;@vgp+hliqaSR?6TpzQ9QlzH8-qoO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76J?_BG`^RXG-p z?YeUND4R2(=NdI(5(aC>i1xC2#ja^G4*wY#Z;X z7tg+sYM8cT`1Z`}0x%95>rTT`q?(;7oMmZ_=IJz@p|f<3&eK!$G|fREM{_*QrD-lh zbJ=rrN|I$oQ!L3bEs`unT7nz}mIJ#q$)?V|ck zTL*8NyEOfwk=VbjbJ3rtKfvB6vxUO9N>;WY&>Fw;EPX`UErkmEs) z2RR<(c#z}sdl~Iw*k~W$c$N9u5B_rf_}fDl{^o}t{h{ao_dEywKfK|A1P+S8RWtrz zBsMY}KXU&=#8LacHI;}C48W`9r}f?YTKo4e$=6nbpS1ALHY^-9g)AidKaQR`v7^f- z>9*KZn+hy46&Oyi^54;4^BlGc(dSSqd>u3;+1+ zN2JtaX_lI(!J5-iz;CTlt0{lcd~-qpe=^*6sGtu{p0~lNUUgYE4W8Z2Tm>dve&RC2 z6A$mPL5kvU+43uvwF*tM%K|e!JvBYOwZIGm@Ky&c$3L(_V?4*Er$UbZ6w7hGyBawD zzUaZZ{^@CdnX-fHKV9K61&%AE^Pb4o`f|$G+hr1T5^FKe-qn*od%It$IgcgH>VBr9x`oz zRuLW+ljfu6VK{X?SMWMk>cw+U#EyS=_3_&8KJdrK>wo)m?aJKiSNPbz{{OMI|Nm}( zxBve;=>Ol2{(tAAS$-Gu>^+*DzSaHzmI>do&pSPu<#_)A?hb|-AI%2K;RAg%>rXvj z%%fTUdi;Or0$-Bb?AyB8*<MCTe|o#83+MZLJFFDYh5O9Ux304j-jpuf4rTYsxx<!!Hw&cMr&iJ9x(uQ*D&iFwU zZq*ro&+=c#jK8&ED{R_sp&9=(J+y6Y!rH!V3upY#Gvn{o32*ipKPda>oAGo0jQ^eA V`^Wd6pZVVLde1%I`q`;B{}1Kp{0RU6 literal 0 HcmV?d00001 diff --git a/internal/repository/user_test.go b/internal/repository/user_test.go index 7c29d59..f5987ac 100644 --- a/internal/repository/user_test.go +++ b/internal/repository/user_test.go @@ -34,7 +34,7 @@ func setupUserTest(t *testing.T) *UserCfgRepo { }` log.Init("info", true) - dbfilepath := "../../test/test.db" + dbfilepath := "testdata/test.db" err := MigrateDB("sqlite3", dbfilepath) if err != nil { t.Fatal(err)