blob: baaf38ebfb1ca3d89849e09e2de972bc14c01076 [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import tempfile
from autotest_lib.client.common_lib import file_utils
_URL_BASE = (''
_PLTG_URL = _URL_BASE + '/pltg'
_PLTU_URL = _URL_BASE + '/pltu'
_PLTP_URL = _URL_BASE + '/pltp'
_MEETU_URL = _URL_BASE + '/meetu'
_MEETP_URL = _URL_BASE + '/meetp'
def _get_content(url):
"""Reads the content of the file at the given |URL|.
url: URL to be fetched.
The content of the fetched file.
with tempfile.NamedTemporaryFile() as named_file:
def use_gaia_login():
"""Returns whether Gaia login should be used by default for load testing."""
res = _get_content(_PLTG_URL)
return res == 'True' or res == 'true'
def get_username():
"""Returns username for load testing."""
return _get_content(_PLTU_URL)
def get_password():
"""Returns password for load testing."""
return _get_content(_PLTP_URL)
def get_meet_username():
"""Returns username for meet testing."""
return _get_content(_MEETU_URL)
def get_meet_password():
"""Returns password for meet testing."""
return _get_content(_MEETP_URL)