mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-22 07:01:12 +02:00
Fixes #1610 1. In `talosconfig`, deprecate `Target` in favor of `Endpoints` (client-side LB to come next). 2. In `osctl`, use `--nodes` in place of `--target`. 3. In `osctl` add option `--endpoints` to override `Endpoints` for the call. Other changes are just updates to catch up with the changes. Most probably I missed something... And CAPI provider needs update. Signed-off-by: Andrey Smirnov <smirnov.andrey@gmail.com>
53 lines
1.5 KiB
Go
53 lines
1.5 KiB
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
|
|
|
|
// Package base provides shared definition of base suites for tests
|
|
package base
|
|
|
|
// TalosSuite defines most common settings for integration test suites
|
|
type TalosSuite struct {
|
|
// Endpoint to use to connect, if not set config is used
|
|
Endpoint string
|
|
// Nodes is a list of Talos cluster addresses (overrides discovery if set)
|
|
Nodes []string
|
|
// TalosConfig is a path to talosconfig
|
|
TalosConfig string
|
|
// Version is the (expected) version of Talos tests are running against
|
|
Version string
|
|
// OsctlPath is path to osctl binary
|
|
OsctlPath string
|
|
|
|
discoveredNodes []string
|
|
}
|
|
|
|
// DiscoverNodes provides basic functionality to discover cluster nodes via test settings.
|
|
//
|
|
// This method is overridden in specific suites to allow for specific discovery.
|
|
func (talosSuite *TalosSuite) DiscoverNodes() []string {
|
|
if talosSuite.discoveredNodes == nil {
|
|
if talosSuite.Nodes != nil {
|
|
talosSuite.discoveredNodes = talosSuite.Nodes
|
|
}
|
|
}
|
|
|
|
return talosSuite.discoveredNodes
|
|
}
|
|
|
|
// ConfiguredSuite expects config to be set before running
|
|
type ConfiguredSuite interface {
|
|
SetConfig(config TalosSuite)
|
|
}
|
|
|
|
// SetConfig implements ConfiguredSuite
|
|
func (suite *TalosSuite) SetConfig(config TalosSuite) {
|
|
*suite = config
|
|
}
|
|
|
|
// NamedSuite interface provides names for test suites
|
|
type NamedSuite interface {
|
|
SuiteName() string
|
|
}
|