[autotest] move tests in rpm_controller to a separate file

rpm_controller is getting big.
Move tests in rpm_controller to rpm_integration_test.py
The tests are commented out because most of the ports are in actual
use now.

CQ-DEPEND=CL:212357
BUG=chromium:392548
TEST=Lock some hosts, change rpm_integration_test to point to those
locked hosts and run the tests.

Change-Id: I131a0b343f95365f2e8c37a22f3b02690e6a5934
Reviewed-on: https://chromium-review.googlesource.com/212348
Tested-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Simran Basi <sbasi@chromium.org>
Commit-Queue: Fang Deng <fdeng@chromium.org>
diff --git a/site_utils/rpm_control_system/rpm_logging_config.py b/site_utils/rpm_control_system/rpm_logging_config.py
index 152d438..b97401c 100644
--- a/site_utils/rpm_control_system/rpm_logging_config.py
+++ b/site_utils/rpm_control_system/rpm_logging_config.py
@@ -12,6 +12,7 @@
 
 import common
 from autotest_lib.site_utils import log_socket_server
+from autotest_lib.site_utils.rpm_control_system import rpm_infrastructure_exception
 
 LOGGING_FORMAT = rpm_config.get('GENERAL', 'logging_format')
 RECEIVERS = rpm_config.get('RPM_INFRASTRUCTURE',
@@ -84,6 +85,10 @@
 
     @returns email_handler: Logging handler used to send out email alerts.
     """
+    if log_socket_server.LogSocketServer.port is None and use_log_server:
+        # Port is unknown, can't log to the server.
+        raise rpm_infrastructure_exception.RPMLoggingSetupError(
+                'set_up_logging failed: Log server port is unknown.')
     if use_log_server:
         socketHandler = logging.handlers.SocketHandler(
                 'localhost', log_socket_server.LogSocketServer.port)