1# Copyright 2014 The Chromium OS Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5from autotest_lib.client.common_lib.cros.tendo import buffet_config
6from autotest_lib.client.common_lib.cros.tendo import privet_helper
7from autotest_lib.server import test
8
9class buffet_WebServerSanity(test.test):
10    """Test that we can connect to buffet's web server and get a response
11    from a simple GET request."""
12    version = 1
13
14    def warmup(self, host):
15        config = buffet_config.BuffetConfig(log_verbosity=3)
16        config.restart_with_config(host=host)
17
18
19    def cleanup(self, host):
20        buffet_config.naive_restart(host=host)
21
22
23    def run_once(self, host):
24        helper = privet_helper.PrivetHelper(host=host)
25        helper.ping_server()
26        helper.ping_server(use_https=True)
27