talos/internal/integration/cli/disk.go
Artem Chernyshev 6ffabe5169 feat: add ability to find disk by disk properties
Fixes: https://github.com/talos-systems/talos/issues/3323

Not exactly matching with udevd generated `by-<id>` symlinks, but should
provide sufficient amount of property selectors to be able to pick
specific disks for any kind of disk: sd card, hdd, ssd, nvme.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
2021-03-23 14:23:02 -07:00

31 lines
710 B
Go

// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
// +build integration_cli
package cli
import (
"github.com/talos-systems/talos/internal/integration/base"
)
// DisksSuite verifies dmesg command.
type DisksSuite struct {
base.CLISuite
}
// SuiteName ...
func (suite *DisksSuite) SuiteName() string {
return "cli.DisksSuite"
}
// TestSuccess runs comand with success.
func (suite *DisksSuite) TestSuccess() {
suite.RunCLI([]string{"disks", "--nodes", suite.RandomDiscoveredNode()})
}
func init() {
allSuites = append(allSuites, new(DisksSuite))
}