summary refs log tree commit diff stats
path: root/svc/query_test.go
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2019-12-19 16:46:34 -0500
committerBen Morrison <ben@gbmor.dev>2019-12-19 16:46:34 -0500
commit7db28dd705dd5463b5e2e9cf6f5fc87db25533ad (patch)
treefc6cf394405a36f36d0b50051b738f25a8605c54 /svc/query_test.go
parentf60789a3bd40b61fb026af2f660bea3b2cc2ce46 (diff)
downloadgetwtxt-7db28dd705dd5463b5e2e9cf6f5fc87db25533ad.tar.gz
decoupled tests from personal twtxt.txt
Rather than use my personal twtxt.txt file, I'm using the
mocked twtxt.txt file I just added to the repository for
test data. It is being fetched via https from github to
avoid having to get rid of the url validity check in the
associated registry library.
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 78d807b..d2d7304 100644
--- a/svc/query_test.go
+++ b/svc/query_test.go
@@ -61,8 +61,8 @@ func Benchmark_dedupe(b *testing.B) {
 func Test_parseQueryOut(t *testing.T) {
 	initTestConf()
 
-	urls := "https://gbmor.dev/twtxt.txt"
-	nick := "gbmor"
+	urls := "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt"
+	nick := "getwtxttest"
 
 	out, _, err := registry.GetTwtxt(urls, nil)
 	if err != nil {
@@ -95,8 +95,8 @@ func Test_parseQueryOut(t *testing.T) {
 func Benchmark_parseQueryOut(b *testing.B) {
 	initTestConf()
 
-	urls := "https://gbmor.dev/twtxt.txt"
-	nick := "gbmor"
+	urls := "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt"
+	nick := "getwtxttest"
 
 	out, _, err := registry.GetTwtxt(urls, nil)
 	if err != nil {
@@ -203,9 +203,9 @@ func Test_compositeStatusQuery(t *testing.T) {
 
 func Benchmark_compositeStatusQuery(b *testing.B) {
 	initTestConf()
-	statuses, _, _ := registry.GetTwtxt("https://gbmor.dev/twtxt.txt", nil)
-	parsed, _ := registry.ParseUserTwtxt(statuses, "gbmor", "https://gbmor.dev/twtxt.txt")
-	_ = twtxtCache.AddUser("gbmor", "https://gbmor.dev/twtxt.txt", net.ParseIP("127.0.0.1"), parsed)
+	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)
 	b.ResetTimer()
 
 	for i := 0; i < b.N; i++ {