cleanup: merge httpheader and httpfailure into model (#758)
These two small packages could easily be merged into the model package, since they're clearly model-like packages. Part of https://github.com/ooni/probe/issues/2115
This commit is contained in:
parent
928de50145
commit
2d721baa91
20 changed files with 74 additions and 90 deletions
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/ooni/probe-cli/v3/internal/atomicx"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/urlgetter"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/experiment/whatsapp"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/internal/httpfailure"
|
||||
"github.com/ooni/probe-cli/v3/internal/engine/mockable"
|
||||
"github.com/ooni/probe-cli/v3/internal/model"
|
||||
)
|
||||
|
|
@ -414,7 +413,7 @@ func TestTestKeysOnlyWebHTTPFailureNo302(t *testing.T) {
|
|||
if tk.WhatsappEndpointsStatus != "ok" {
|
||||
t.Fatal("invalid WhatsappEndpointsStatus")
|
||||
}
|
||||
if *tk.WhatsappWebFailure != httpfailure.UnexpectedStatusCode {
|
||||
if *tk.WhatsappWebFailure != model.HTTPUnexpectedStatusCode {
|
||||
t.Fatal("invalid WhatsappWebFailure")
|
||||
}
|
||||
if tk.WhatsappWebStatus != "blocked" {
|
||||
|
|
@ -459,7 +458,7 @@ func TestTestKeysOnlyWebHTTPFailureNoLocations(t *testing.T) {
|
|||
if tk.WhatsappEndpointsStatus != "ok" {
|
||||
t.Fatal("invalid WhatsappEndpointsStatus")
|
||||
}
|
||||
if *tk.WhatsappWebFailure != httpfailure.UnexpectedRedirectURL {
|
||||
if *tk.WhatsappWebFailure != model.HTTPUnexpectedRedirectURL {
|
||||
t.Fatal("invalid WhatsappWebFailure")
|
||||
}
|
||||
if tk.WhatsappWebStatus != "blocked" {
|
||||
|
|
@ -504,7 +503,7 @@ func TestTestKeysOnlyWebHTTPFailureNotExpectedURL(t *testing.T) {
|
|||
if tk.WhatsappEndpointsStatus != "ok" {
|
||||
t.Fatal("invalid WhatsappEndpointsStatus")
|
||||
}
|
||||
if *tk.WhatsappWebFailure != httpfailure.UnexpectedRedirectURL {
|
||||
if *tk.WhatsappWebFailure != model.HTTPUnexpectedRedirectURL {
|
||||
t.Fatal("invalid WhatsappWebFailure")
|
||||
}
|
||||
if tk.WhatsappWebStatus != "blocked" {
|
||||
|
|
@ -549,7 +548,7 @@ func TestTestKeysOnlyWebHTTPFailureTooManyURLs(t *testing.T) {
|
|||
if tk.WhatsappEndpointsStatus != "ok" {
|
||||
t.Fatal("invalid WhatsappEndpointsStatus")
|
||||
}
|
||||
if *tk.WhatsappWebFailure != httpfailure.UnexpectedRedirectURL {
|
||||
if *tk.WhatsappWebFailure != model.HTTPUnexpectedRedirectURL {
|
||||
t.Fatal("invalid WhatsappWebFailure")
|
||||
}
|
||||
if tk.WhatsappWebStatus != "blocked" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue