about summary refs log tree commit diff stats
path: root/svc/query_test.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-06-20 02:27:31 -0400
committerBen Morrison <ben@gbmor.dev>2020-06-20 02:27:31 -0400
commit538e305925b9b04102ef0a4fb7cca19a6c116142 (patch)
tree8e68b426c40c3151f39da1be874d2938f31ab5f9 /svc/query_test.go
parent0a69c582ec8b88b1d3af70ef43c3eeb1b99f973d (diff)
downloadgetwtxt-538e305925b9b04102ef0a4fb7cca19a6c116142.tar.gz
updating module to live at sourcehut
Also moving the 'registry' library into this repo, rather
than maintaining them separately. It will still be decoupled,
just live in this repository.
Diffstat (limited to 'svc/query_test.go')
-rw-r--r--svc/query_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/svc/query_test.go b/svc/query_test.go
index d2d7304..939592e 100644
--- a/svc/query_test.go
+++ b/svc/query_test.go
@@ -17,7 +17,7 @@ You should have received a copy of the GNU General Public License
 along with Getwtxt.  If not, see <https://www.gnu.org/licenses/>.
 */
 
-package svc // import "github.com/getwtxt/getwtxt/svc"
+package svc // import "git.sr.ht/~gbmor/getwtxt/svc"
 
 import (
 	"net"
@@ -25,7 +25,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/getwtxt/registry"
+	"git.sr.ht/~gbmor/getwtxt/registry"
 )
 
 func Test_dedupe(t *testing.T) {
@@ -61,7 +61,7 @@ func Benchmark_dedupe(b *testing.B) {
 func Test_parseQueryOut(t *testing.T) {
 	initTestConf()
 
-	urls := "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt"
+	urls := testTwtxtURL
 	nick := "getwtxttest"
 
 	out, _, err := registry.GetTwtxt(urls, nil)
@@ -95,7 +95,7 @@ func Test_parseQueryOut(t *testing.T) {
 func Benchmark_parseQueryOut(b *testing.B) {
 	initTestConf()
 
-	urls := "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt"
+	urls := testTwtxtURL
 	nick := "getwtxttest"
 
 	out, _, err := registry.GetTwtxt(urls, nil)
@@ -203,9 +203,9 @@ func Test_compositeStatusQuery(t *testing.T) {
 
 func Benchmark_compositeStatusQuery(b *testing.B) {
 	initTestConf()
-	statuses, _, _ := registry.GetTwtxt("https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt", nil)
-	parsed, _ := registry.ParseUserTwtxt(statuses, "getwtxttest", "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt")
-	_ = twtxtCache.AddUser("getwtxttest", "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt", net.ParseIP("127.0.0.1"), parsed)
+	statuses, _, _ := registry.GetTwtxt(testTwtxtURL, nil)
+	parsed, _ := registry.ParseUserTwtxt(statuses, "getwtxttest", testTwtxtURL)
+	_ = twtxtCache.AddUser("getwtxttest", testTwtxtURL, net.ParseIP("127.0.0.1"), parsed)
 	b.ResetTimer()
 
 	for i := 0; i < b.N; i++ {