diff --git a/command/agent/check_test.go b/command/agent/check_test.go
index <HASH>..<HASH> 100644
--- a/command/agent/check_test.go
+++ b/command/agent/check_test.go
@@ -585,6 +585,7 @@ func TestDockerCheckWhenExecInfoFails(t *testing.T) {
 }
 
 func TestDockerCheckDefaultToSh(t *testing.T) {
+	os.Setenv("SHELL", "")
 	mock := &MockNotify{
 		state:   make(map[string]string),
 		updates: make(map[string]int),
Forcing the Env variable to empty while testing the default shell logic