feat(hardlink): unify kiosk payments and finalize legacy cleanup
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
package handlers
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
type offlineDefaultTransport struct{}
|
||||
|
||||
func (offlineDefaultTransport) RoundTrip(*http.Request) (*http.Response, error) {
|
||||
return nil, errors.New("offline handler tests prohibit default network access")
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
// Fixtures supply in-memory transports or httptest server-specific clients.
|
||||
// In particular, error-notification code cannot reach a live email service.
|
||||
http.DefaultTransport = offlineDefaultTransport{}
|
||||
http.DefaultClient = &http.Client{Transport: http.DefaultTransport}
|
||||
os.Exit(m.Run())
|
||||
}
|
||||
Reference in New Issue
Block a user