mocks

package
v0.0.0-...-d996d1d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 24, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Copyright 2023 The Chromium Authors Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockCPUTemperature

type MockCPUTemperature struct {
	mock.Mock
}

func (*MockCPUTemperature) GetCurrentCPUTemperature

func (m *MockCPUTemperature) GetCurrentCPUTemperature() (float32, error)

GetCurrentCPUTemperature Get the current temperature of CPU

type MockDUTServices

type MockDUTServices struct {
	mock.Mock
}

MockDUTServices This object is only for testing

Object should provide the same functions that `IDUTServices` interfaces provide.

func (*MockDUTServices) GetBoard

func (m *MockDUTServices) GetBoard(ctx context.Context, IP string) (string, error)

func (*MockDUTServices) GetCCDStatus

func (m *MockDUTServices) GetCCDStatus(ctx context.Context, address string) (string, error)

GetCCDStatus gets CCD status from the DUT

func (*MockDUTServices) GetConnectedIPs

func (m *MockDUTServices) GetConnectedIPs(ctx context.Context) ([]dut_services.Device, error)

func (*MockDUTServices) GetGSCSerialAndServoUSBCount

func (m *MockDUTServices) GetGSCSerialAndServoUSBCount(ctx context.Context, address string) (*dut_services.GSCInfo, error)

GetGSCSerialAndServoUSBCount gets the Cr50 or Ti50 port serial number on the DUT`

func (*MockDUTServices) GetModel

func (m *MockDUTServices) GetModel(ctx context.Context, IP string) (string, error)

func (*MockDUTServices) GetServoSerial

func (m *MockDUTServices) GetServoSerial(ctx context.Context, IP string, usbDevices []enumeration.USBDevice) (bool, string, error)

GetServoSerial gets the Servo serial number for give DUT IP address.

func (*MockDUTServices) GetUSBDevicePaths

func (m *MockDUTServices) GetUSBDevicePaths(ctx context.Context) ([]enumeration.USBDevice, error)

GetUSBDevicePaths returns all the USBDevices instance of plugged devices

func (*MockDUTServices) RunCommandOnIP

func (m *MockDUTServices) RunCommandOnIP(ctx context.Context, IP, cmd string) (*models.SSHResult, error)

RunCommandOnIP send the command to the DUT device and then get the result back

func (*MockDUTServices) RunCommandOnIPs

func (m *MockDUTServices) RunCommandOnIPs(ctx context.Context, IPs []string, cmd string) []*models.SSHResult

RunCommandOnIPs send the command to DUT devices and then get the result back

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL