summary refs log tree commit diff stats
path: root/svc/post_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/post_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/post_test.go')
-rw-r--r--svc/post_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/svc/post_test.go b/svc/post_test.go
index f799a08..cd15565 100644
--- a/svc/post_test.go
+++ b/svc/post_test.go
@@ -38,8 +38,8 @@ var apiPostUserCases = []struct {
 }{
 	{
 		name:    "Known Good User",
-		nick:    "gbmor",
-		uri:     "https://gbmor.dev/twtxt.txt",
+		nick:    "getwtxttest",
+		uri:     "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt",
 		wantErr: false,
 	},
 	{
@@ -100,7 +100,7 @@ func Benchmark_apiPostUser(b *testing.B) {
 	twtxtCache = registry.New(nil)
 
 	params := url.Values{}
-	params.Set("url", "https://gbmor.dev/twtxt.txt")
+	params.Set("url", "https://github.com/getwtxt/getwtxt/raw/master/testdata/twtxt.txt")
 	params.Set("nickname", "gbmor")
 	req, _ := http.NewRequest("POST", "https://localhost"+portnum+"/api/plain/users", strings.NewReader(params.Encode()))
 	req.Header.Add("Content-Type", "application/x-www-form-urlencoded")