Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(webconnectivityqa): Always close the QAEnv #1245

Merged
merged 1 commit into from
Sep 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/experiment/webconnectivityqa/badssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ func TestBadSSLConditions(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.testCase.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.testCase.Configure(env)

env.Do(func() {
Expand Down
4 changes: 4 additions & 0 deletions internal/experiment/webconnectivityqa/control_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

func TestControlFailureWithSuccessfulHTTPWebsite(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := controlFailureWithSuccessfulHTTPWebsite()
tc.Configure(env)

Expand All @@ -33,6 +35,8 @@ func TestControlFailureWithSuccessfulHTTPWebsite(t *testing.T) {

func TestControlFailureWithSuccessfulHTTPSWebsite(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := controlFailureWithSuccessfulHTTPSWebsite()
tc.Configure(env)

Expand Down
4 changes: 4 additions & 0 deletions internal/experiment/webconnectivityqa/dnsblocking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

func TestDNSBlockingAndroidDNSCacheNoData(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := dnsBlockingAndroidDNSCacheNoData()
tc.Configure(env)

Expand All @@ -29,6 +31,8 @@ func TestDNSBlockingAndroidDNSCacheNoData(t *testing.T) {

func TestDNSBlockingNXDOMAIN(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := dnsBlockingNXDOMAIN()
tc.Configure(env)

Expand Down
2 changes: 2 additions & 0 deletions internal/experiment/webconnectivityqa/dnshijacking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ func TestDNSHijackingTestCases(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down
4 changes: 4 additions & 0 deletions internal/experiment/webconnectivityqa/httpdiff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ func TestHTTPDiffWithConsistentDNS(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down Expand Up @@ -50,6 +52,8 @@ func TestHTTPDiffWithInconsistentDNS(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down
10 changes: 10 additions & 0 deletions internal/experiment/webconnectivityqa/redirect_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func TestRedirectWithConsistentDNSAndThenConnectionRefused(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down Expand Up @@ -55,6 +57,8 @@ func TestRedirectWithConsistentDNSAndThenConnectionReset(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down Expand Up @@ -86,6 +90,8 @@ func TestRedirectWithConsistentDNSAndThenNXDOMAIN(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down Expand Up @@ -125,6 +131,8 @@ func TestRedirectWithConsistentDNSAndThenEOF(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down Expand Up @@ -157,6 +165,8 @@ func TestRedirectWithConsistentDNSAndThenTimeout(t *testing.T) {
for _, tc := range testcases {
t.Run(tc.Name, func(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc.Configure(env)

env.Do(func() {
Expand Down
4 changes: 4 additions & 0 deletions internal/experiment/webconnectivityqa/tcpblocking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (

func TestTCPBlockingConnectTimeout(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := tcpBlockingConnectTimeout()
tc.Configure(env)

Expand All @@ -30,6 +32,8 @@ func TestTCPBlockingConnectTimeout(t *testing.T) {

func TestTCPBlockingConnectionRefusedWithInconsistentDNS(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := tcpBlockingConnectionRefusedWithInconsistentDNS()
tc.Configure(env)

Expand Down
4 changes: 4 additions & 0 deletions internal/experiment/webconnectivityqa/tlsblocking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ import (

func TestBlockingTLSConnectionResetWithConsistentDNS(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := tlsBlockingConnectionResetWithConsistentDNS()
tc.Configure(env)

Expand All @@ -40,6 +42,8 @@ func TestBlockingTLSConnectionResetWithConsistentDNS(t *testing.T) {

func TestBlockingTLSConnectionResetWithInconsistentDNS(t *testing.T) {
env := netemx.MustNewScenario(netemx.InternetScenario)
defer env.Close()

tc := tlsBlockingConnectionResetWithInconsistentDNS()
tc.Configure(env)

Expand Down