lib: remote_access: always make shell=False with strings an error

BUG=b:269266992
TEST=CQ passes

Change-Id: I0641c612b4914f1439a76edb00ebae4842e74eb1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/5525869
Tested-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
diff --git a/lib/remote_access.py b/lib/remote_access.py
index 2e39fd4..f77f4ce 100644
--- a/lib/remote_access.py
+++ b/lib/remote_access.py
@@ -17,7 +17,6 @@
 import tempfile
 import time
 from typing import List, Optional, Union
-import warnings
 
 from chromite.lib import constants
 from chromite.lib import cros_build_lib
@@ -461,20 +460,11 @@
                 # Prepend sudo to cmd.
                 ssh_cmd.append("sudo")
 
-            # TODO(b/269266992): Delete test-only logic & always make this
-            # fatal.
-            fatal_only_in_test = True
             if isinstance(cmd, str):
                 if not kwargs.pop("shell", None):
-                    if fatal_only_in_test:
-                        assert "PYTEST_CURRENT_TEST" not in os.environ
-                        warnings.warn(
-                            "remote_run: String command requires shell=True"
-                        )
-                    else:
-                        raise ValueError(
-                            "Cannot run a string command without a shell"
-                        )
+                    raise ValueError(
+                        "Cannot run a string command without a shell"
+                    )
                 ssh_cmd += [cmd]
             else:
                 if kwargs.pop("shell", False):