Skip to content
Permalink
Browse files

(e2e): Remove old e2e tests

  • Loading branch information
erbesharat committed Nov 30, 2019
1 parent 813a5c1 commit 07c39fc4594f27c002a3e1ca9aa27d3e27ab0505
Showing with 0 additions and 88 deletions.
  1. +0 −84 fallback_test.go
  2. +0 −4 txtdirect_test.go
@@ -103,96 +103,12 @@ func Test_fallbackE2E(t *testing.T) {
redirect string
headers http.Header
}{
{
url: "https://fallbackpath.test",
enable: []string{"www"},
headers: http.Header{},
},
{
url: "https://127.0.0.1",
enable: []string{},
redirect: "https://isip.test",
headers: http.Header{},
},
{
url: "https://fallbackpath.test/wildcard",
enable: []string{},
code: 404,
headers: http.Header{},
},
{
url: "https://fallbackpath.test/refrom",
enable: []string{"path"},
code: 302,
to: "https://to.works.fine.test",
headers: http.Header{},
},
{
url: "https://fallbackpath.test/",
enable: []string{"path"},
code: 302,
to: "https://to.works.fine.test",
headers: http.Header{},
},
{
url: "https://lenfrom.test/",
enable: []string{"path"},
code: 302,
to: "https://lenfrom.fallback.test",
headers: http.Header{},
},
{
url: "https://fallbackdockerv2.test",
enable: []string{"dockerv2"},
code: 302,
to: "https://docker.to.test/",
headers: http.Header{},
},
{
url: "https://fallbackdockerv2.test/",
enable: []string{"dockerv2"},
code: 308,
root: "https://docker.root.test",
headers: http.Header{
"User-Agent": []string{"Docker-Client"},
},
},
{
url: "https://wrong.fallbackdockerv2.test/v2/test/path",
enable: []string{"dockerv2"},
code: 302,
redirect: "https://gcr.io/",
headers: http.Header{
"User-Agent": []string{"Docker-Client"},
},
},
{
url: "https://fallbackhost.test",
enable: []string{"host"},
code: 404,
headers: http.Header{},
},
{
url: "https://fallbackgometa.test/pathto",
enable: []string{"path", "gometa"},
code: 302,
to: "https://gometa.path.to.test",
headers: http.Header{},
},
{
url: "https://fallbackgit.test",
enable: []string{"git"},
code: 302,
website: "https://website.example.com",
headers: http.Header{},
},
{
url: "https://path.fallbackgit.test/example",
enable: []string{"path", "git"},
code: 302,
website: "https://website.example.com",
headers: http.Header{},
},
}
for _, test := range tests {
req := httptest.NewRequest("GET", test.url, nil)
@@ -39,10 +39,6 @@ var txts = map[string]string{
// query() function test records
"_redirect.about.test.": "v=txtv0;to=https://about.txtdirect.org",
"_redirect.pkg.test.": "v=txtv0;to=https://pkg.txtdirect.org;type=gometa",

//
// Fallback records
//
}

// Testing DNS server port

0 comments on commit 07c39fc

Please sign in to comment.
You can’t perform that action at this time.