chore: Refactor site to improve testing (#2014)

It was difficult to develop this package due to the
embed build tag being mandatory on the tests. The logic
to test doesn't require any embedded files.
This commit is contained in:
Kyle Carberry authored and GitHub committed 2022-06-03 04:27:21 +00:00
1 parent 89dde21837
commit 61aacff444
6 files changed
+40 -40

No files matched your search

+1 -1
View File
@@ -334,7 +334,7 @@ func New(options *Options) *API {
r.Get("/state", api.workspaceBuildState)
})
})
r.NotFound(site.DefaultHandler().ServeHTTP)
r.NotFound(site.Handler(site.FS()).ServeHTTP)
return api
}