From 644b17de10112b4767a6bfed5660ff8a51617d64 Mon Sep 17 00:00:00 2001 From: Umputun Date: Fri, 16 Feb 2018 02:30:57 -0600 Subject: [PATCH] fix rest tests --- app/rest/server/rest_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/rest/server/rest_test.go b/app/rest/server/rest_test.go index 13a58234..873d3d33 100644 --- a/app/rest/server/rest_test.go +++ b/app/rest/server/rest_test.go @@ -339,10 +339,10 @@ func TestServer_List(t *testing.T) { assert.Equal(t, []store.PostInfo{{URL: "https://radio-t.com/blah1", Count: 3}, {URL: "https://radio-t.com/blah2", Count: 2}}, pi) } -func prep(t *testing.T) (srv *Server, port int) { +func prep(t *testing.T) (srv *Rest, port int) { dataStore, err := store.NewBoltDB(store.BoltSite{FileName: testDb, SiteID: "radio-t"}) require.Nil(t, err) - srv = &Server{ + srv = &Rest{ DataService: store.Service{Interface: dataStore, EditDuration: 5 * time.Minute}, DevMode: true, Authenticator: auth.Authenticator{ @@ -387,7 +387,7 @@ func addComment(t *testing.T, c store.Comment, port int) string { return crResp["id"].(string) } -func cleanup(srv *Server) { +func cleanup(srv *Rest) { srv.httpServer.Close() srv.httpServer.Shutdown(context.Background()) os.Remove(testDb)