Documentation ¶
Overview ¶
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. A copy of the License is located at
http://aws.amazon.com/apache2.0/
or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewLogEntry(t testing.TB) *log.Entry
- func RequiresKVM(t testing.TB)
- func RequiresRoot(t testing.TB)
- type MockClient
- func (c *MockClient) CreateSnapshot(params *ops.CreateSnapshotParams) (*ops.CreateSnapshotNoContent, error)
- func (c *MockClient) CreateSyncAction(params *ops.CreateSyncActionParams) (*ops.CreateSyncActionNoContent, error)
- func (c *MockClient) DescribeBalloonConfig(params *ops.DescribeBalloonConfigParams) (*ops.DescribeBalloonConfigOK, error)
- func (c *MockClient) DescribeBalloonStats(params *ops.DescribeBalloonStatsParams) (*ops.DescribeBalloonStatsOK, error)
- func (c *MockClient) DescribeInstance(params *ops.DescribeInstanceParams) (*ops.DescribeInstanceOK, error)
- func (c *MockClient) GetExportVMConfig(params *ops.GetExportVMConfigParams) (*ops.GetExportVMConfigOK, error)
- func (c *MockClient) GetFirecrackerVersion(params *ops.GetFirecrackerVersionParams) (*ops.GetFirecrackerVersionOK, error)
- func (c *MockClient) GetMachineConfiguration(params *ops.GetMachineConfigurationParams) (*ops.GetMachineConfigurationOK, error)
- func (c *MockClient) GetMmds(params *ops.GetMmdsParams) (*ops.GetMmdsOK, error)
- func (c *MockClient) LoadSnapshot(params *ops.LoadSnapshotParams) (*ops.LoadSnapshotNoContent, error)
- func (c *MockClient) PatchBalloon(params *ops.PatchBalloonParams) (*ops.PatchBalloonNoContent, error)
- func (c *MockClient) PatchBalloonStatsInterval(params *ops.PatchBalloonStatsIntervalParams) (*ops.PatchBalloonStatsIntervalNoContent, error)
- func (c *MockClient) PatchGuestDriveByID(params *ops.PatchGuestDriveByIDParams) (*ops.PatchGuestDriveByIDNoContent, error)
- func (c *MockClient) PatchGuestNetworkInterfaceByID(params *ops.PatchGuestNetworkInterfaceByIDParams) (*ops.PatchGuestNetworkInterfaceByIDNoContent, error)
- func (c *MockClient) PatchMachineConfiguration(params *ops.PatchMachineConfigurationParams) (*ops.PatchMachineConfigurationNoContent, error)
- func (c *MockClient) PatchMmds(params *ops.PatchMmdsParams) (*ops.PatchMmdsNoContent, error)
- func (c *MockClient) PatchVM(params *ops.PatchVMParams) (*ops.PatchVMNoContent, error)
- func (c *MockClient) PutBalloon(params *ops.PutBalloonParams) (*ops.PutBalloonNoContent, error)
- func (c *MockClient) PutGuestBootSource(params *ops.PutGuestBootSourceParams) (*ops.PutGuestBootSourceNoContent, error)
- func (c *MockClient) PutGuestDriveByID(params *ops.PutGuestDriveByIDParams) (*ops.PutGuestDriveByIDNoContent, error)
- func (c *MockClient) PutGuestNetworkInterfaceByID(params *ops.PutGuestNetworkInterfaceByIDParams) (*ops.PutGuestNetworkInterfaceByIDNoContent, error)
- func (c *MockClient) PutGuestVsock(params *ops.PutGuestVsockParams) (*ops.PutGuestVsockNoContent, error)
- func (c *MockClient) PutLogger(params *ops.PutLoggerParams) (*ops.PutLoggerNoContent, error)
- func (c *MockClient) PutMachineConfiguration(params *ops.PutMachineConfigurationParams) (*ops.PutMachineConfigurationNoContent, error)
- func (c *MockClient) PutMetrics(params *ops.PutMetricsParams) (*ops.PutMetricsNoContent, error)
- func (c *MockClient) PutMmds(params *ops.PutMmdsParams) (*ops.PutMmdsNoContent, error)
- func (c *MockClient) PutMmdsConfig(params *ops.PutMmdsConfigParams) (*ops.PutMmdsConfigNoContent, error)
- type TestWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogEntry ¶ added in v0.17.0
NewLogEntry creates log.Entry. The level is specified by "FC_TEST_LOG_LEVEL" environment variable
func RequiresKVM ¶ added in v1.0.0
func RequiresRoot ¶
RequiresRoot will ensure that tests that require root access are actually root. In addition, this will skip root tests if the DISABLE_ROOT_TESTS is set to true
Types ¶
type MockClient ¶
type MockClient struct { CreateSnapshotFn func(params *ops.CreateSnapshotParams) (*ops.CreateSnapshotNoContent, error) CreateSyncActionFn func(params *ops.CreateSyncActionParams) (*ops.CreateSyncActionNoContent, error) DescribeBalloonConfigFn func(params *ops.DescribeBalloonConfigParams) (*ops.DescribeBalloonConfigOK, error) DescribeBalloonStatsFn func(params *ops.DescribeBalloonStatsParams) (*ops.DescribeBalloonStatsOK, error) DescribeInstanceFn func(params *ops.DescribeInstanceParams) (*ops.DescribeInstanceOK, error) GetExportVMConfigFn func(params *ops.GetExportVMConfigParams) (*ops.GetExportVMConfigOK, error) GetFirecrackerVersionFn func(params *ops.GetFirecrackerVersionParams) (*ops.GetFirecrackerVersionOK, error) GetMachineConfigurationFn func(params *ops.GetMachineConfigurationParams) (*ops.GetMachineConfigurationOK, error) GetMmdsFn func(params *ops.GetMmdsParams) (*ops.GetMmdsOK, error) LoadSnapshotFn func(params *ops.LoadSnapshotParams) (*ops.LoadSnapshotNoContent, error) PatchBalloonFn func(params *ops.PatchBalloonParams) (*ops.PatchBalloonNoContent, error) PatchBalloonStatsIntervalFn func(params *ops.PatchBalloonStatsIntervalParams) (*ops.PatchBalloonStatsIntervalNoContent, error) PatchGuestDriveByIDFn func(params *ops.PatchGuestDriveByIDParams) (*ops.PatchGuestDriveByIDNoContent, error) PatchGuestNetworkInterfaceByIDFn func(params *ops.PatchGuestNetworkInterfaceByIDParams) (*ops.PatchGuestNetworkInterfaceByIDNoContent, error) PatchMachineConfigurationFn func(params *ops.PatchMachineConfigurationParams) (*ops.PatchMachineConfigurationNoContent, error) PatchMmdsFn func(params *ops.PatchMmdsParams) (*ops.PatchMmdsNoContent, error) PatchVMFn func(params *ops.PatchVMParams) (*ops.PatchVMNoContent, error) PutBalloonFn func(params *ops.PutBalloonParams) (*ops.PutBalloonNoContent, error) PutGuestBootSourceFn func(params *ops.PutGuestBootSourceParams) (*ops.PutGuestBootSourceNoContent, error) PutGuestDriveByIDFn func(params *ops.PutGuestDriveByIDParams) (*ops.PutGuestDriveByIDNoContent, error) PutGuestNetworkInterfaceByIDFn func(params *ops.PutGuestNetworkInterfaceByIDParams) (*ops.PutGuestNetworkInterfaceByIDNoContent, error) PutGuestVsockFn func(params *ops.PutGuestVsockParams) (*ops.PutGuestVsockNoContent, error) PutLoggerFn func(params *ops.PutLoggerParams) (*ops.PutLoggerNoContent, error) PutMachineConfigurationFn func(params *ops.PutMachineConfigurationParams) (*ops.PutMachineConfigurationNoContent, error) PutMetricsFn func(params *ops.PutMetricsParams) (*ops.PutMetricsNoContent, error) PutMmdsFn func(params *ops.PutMmdsParams) (*ops.PutMmdsNoContent, error) PutMmdsConfigFn func(params *ops.PutMmdsConfigParams) (*ops.PutMmdsConfigNoContent, error) }
func (*MockClient) CreateSnapshot ¶ added in v1.0.0
func (c *MockClient) CreateSnapshot(params *ops.CreateSnapshotParams) (*ops.CreateSnapshotNoContent, error)
func (*MockClient) CreateSyncAction ¶
func (c *MockClient) CreateSyncAction(params *ops.CreateSyncActionParams) (*ops.CreateSyncActionNoContent, error)
func (*MockClient) DescribeBalloonConfig ¶ added in v1.0.0
func (c *MockClient) DescribeBalloonConfig(params *ops.DescribeBalloonConfigParams) (*ops.DescribeBalloonConfigOK, error)
func (*MockClient) DescribeBalloonStats ¶ added in v1.0.0
func (c *MockClient) DescribeBalloonStats(params *ops.DescribeBalloonStatsParams) (*ops.DescribeBalloonStatsOK, error)
func (*MockClient) DescribeInstance ¶
func (c *MockClient) DescribeInstance(params *ops.DescribeInstanceParams) (*ops.DescribeInstanceOK, error)
func (*MockClient) GetExportVMConfig ¶ added in v1.0.0
func (c *MockClient) GetExportVMConfig(params *ops.GetExportVMConfigParams) (*ops.GetExportVMConfigOK, error)
func (*MockClient) GetFirecrackerVersion ¶ added in v1.0.0
func (c *MockClient) GetFirecrackerVersion(params *ops.GetFirecrackerVersionParams) (*ops.GetFirecrackerVersionOK, error)
func (*MockClient) GetMachineConfiguration ¶ added in v0.17.0
func (c *MockClient) GetMachineConfiguration(params *ops.GetMachineConfigurationParams) (*ops.GetMachineConfigurationOK, error)
func (*MockClient) GetMmds ¶
func (c *MockClient) GetMmds(params *ops.GetMmdsParams) (*ops.GetMmdsOK, error)
func (*MockClient) LoadSnapshot ¶ added in v1.0.0
func (c *MockClient) LoadSnapshot(params *ops.LoadSnapshotParams) (*ops.LoadSnapshotNoContent, error)
func (*MockClient) PatchBalloon ¶ added in v1.0.0
func (c *MockClient) PatchBalloon(params *ops.PatchBalloonParams) (*ops.PatchBalloonNoContent, error)
func (*MockClient) PatchBalloonStatsInterval ¶ added in v1.0.0
func (c *MockClient) PatchBalloonStatsInterval(params *ops.PatchBalloonStatsIntervalParams) (*ops.PatchBalloonStatsIntervalNoContent, error)
func (*MockClient) PatchGuestDriveByID ¶
func (c *MockClient) PatchGuestDriveByID(params *ops.PatchGuestDriveByIDParams) (*ops.PatchGuestDriveByIDNoContent, error)
func (*MockClient) PatchGuestNetworkInterfaceByID ¶
func (c *MockClient) PatchGuestNetworkInterfaceByID(params *ops.PatchGuestNetworkInterfaceByIDParams) (*ops.PatchGuestNetworkInterfaceByIDNoContent, error)
func (*MockClient) PatchMachineConfiguration ¶ added in v0.17.0
func (c *MockClient) PatchMachineConfiguration(params *ops.PatchMachineConfigurationParams) (*ops.PatchMachineConfigurationNoContent, error)
func (*MockClient) PatchMmds ¶
func (c *MockClient) PatchMmds(params *ops.PatchMmdsParams) (*ops.PatchMmdsNoContent, error)
func (*MockClient) PatchVM ¶ added in v1.0.0
func (c *MockClient) PatchVM(params *ops.PatchVMParams) (*ops.PatchVMNoContent, error)
func (*MockClient) PutBalloon ¶ added in v1.0.0
func (c *MockClient) PutBalloon(params *ops.PutBalloonParams) (*ops.PutBalloonNoContent, error)
func (*MockClient) PutGuestBootSource ¶
func (c *MockClient) PutGuestBootSource(params *ops.PutGuestBootSourceParams) (*ops.PutGuestBootSourceNoContent, error)
func (*MockClient) PutGuestDriveByID ¶
func (c *MockClient) PutGuestDriveByID(params *ops.PutGuestDriveByIDParams) (*ops.PutGuestDriveByIDNoContent, error)
func (*MockClient) PutGuestNetworkInterfaceByID ¶
func (c *MockClient) PutGuestNetworkInterfaceByID(params *ops.PutGuestNetworkInterfaceByIDParams) (*ops.PutGuestNetworkInterfaceByIDNoContent, error)
func (*MockClient) PutGuestVsock ¶ added in v0.19.0
func (c *MockClient) PutGuestVsock(params *ops.PutGuestVsockParams) (*ops.PutGuestVsockNoContent, error)
func (*MockClient) PutLogger ¶
func (c *MockClient) PutLogger(params *ops.PutLoggerParams) (*ops.PutLoggerNoContent, error)
func (*MockClient) PutMachineConfiguration ¶
func (c *MockClient) PutMachineConfiguration(params *ops.PutMachineConfigurationParams) (*ops.PutMachineConfigurationNoContent, error)
func (*MockClient) PutMetrics ¶ added in v0.22.0
func (c *MockClient) PutMetrics(params *ops.PutMetricsParams) (*ops.PutMetricsNoContent, error)
func (*MockClient) PutMmds ¶
func (c *MockClient) PutMmds(params *ops.PutMmdsParams) (*ops.PutMmdsNoContent, error)
func (*MockClient) PutMmdsConfig ¶ added in v0.22.0
func (c *MockClient) PutMmdsConfig(params *ops.PutMmdsConfigParams) (*ops.PutMmdsConfigNoContent, error)
type TestWriter ¶ added in v0.19.0
TestWriter is used to mock out writing and/or do other things such as syncing when to do assertions in the event that a writer is used in a goroutine