fakeufsdata

package
v0.0.0-...-9994f1b Latest Latest
Warning

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

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

Documentation

Overview

Package fakeufsdata contains fake UFS data to be used in tests.

Comments adorning fake responses should contain enough information to indicate: 1) the UFS RPC that they are faking. 2) the resource that they describe.

Index

Constants

View Source
const FakeOctopusDUTHostname = "fake-octopus-dut-1"

FakeOctopusDUTHostname is the hostname of a fake octopus DUT.

Variables

View Source
var FakeOctopusDUTDeviceDataResponse = &ufsAPI.GetDeviceDataResponse{
	Resource: &ufsAPI.GetDeviceDataResponse_ChromeOsDeviceData{
		ChromeOsDeviceData: &models.ChromeOSDeviceData{
			LabConfig: &models.MachineLSE{
				Lse: &models.MachineLSE_ChromeosMachineLse{
					ChromeosMachineLse: &models.ChromeOSMachineLSE{
						ChromeosLse: &models.ChromeOSMachineLSE_DeviceLse{
							DeviceLse: &models.ChromeOSDeviceLSE{
								Device: &models.ChromeOSDeviceLSE_Dut{
									Dut: &lab.DeviceUnderTest{
										Hostname: FakeOctopusDUTHostname,
									},
								},
							},
						},
					},
				},
			},
			Machine: &models.Machine{
				Device: &models.Machine_ChromeosMachine{
					ChromeosMachine: &models.ChromeOSMachine{
						BuildTarget: "build-target",
						Model:       "model",
					},
				},
			},
		},
	},
	ResourceType: ufsAPI.GetDeviceDataResponse_RESOURCE_TYPE_CHROMEOS_DEVICE,
}

FakeOctopusDUTDeviceDataResponse is a fake octopus DUT with hostname "fake-octopus-dut-1".

It is very useful in tests.

View Source
var FakeOctopusDUTWithServoDeviceDataResponse = &ufsAPI.GetDeviceDataResponse{
	Resource: &ufsAPI.GetDeviceDataResponse_ChromeOsDeviceData{
		ChromeOsDeviceData: &models.ChromeOSDeviceData{
			LabConfig: &models.MachineLSE{
				Lse: &models.MachineLSE_ChromeosMachineLse{
					ChromeosMachineLse: &models.ChromeOSMachineLSE{
						ChromeosLse: &models.ChromeOSMachineLSE_DeviceLse{
							DeviceLse: &models.ChromeOSDeviceLSE{
								Device: &models.ChromeOSDeviceLSE_Dut{
									Dut: &lab.DeviceUnderTest{
										Hostname: FakeOctopusDUTHostname,
										Peripherals: &lab.Peripherals{
											Servo: &lab.Servo{
												ServoHostname: "fake-labstation",
											},
										},
									},
								},
							},
						},
					},
				},
			},
			Machine: &models.Machine{
				Device: &models.Machine_ChromeosMachine{
					ChromeosMachine: &models.ChromeOSMachine{
						BuildTarget: "build-target",
						Model:       "model",
					},
				},
			},
		},
	},
	ResourceType: ufsAPI.GetDeviceDataResponse_RESOURCE_TYPE_CHROMEOS_DEVICE,
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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