mirror of
https://github.com/siderolabs/talos.git
synced 2025-08-11 17:17:05 +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>
31 lines
774 B
Go
31 lines
774 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 base
|
|
|
|
import (
|
|
"os/exec"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
)
|
|
|
|
// CLISuite is a base suite for CLI tests
|
|
type CLISuite struct {
|
|
suite.Suite
|
|
TalosSuite
|
|
}
|
|
|
|
// RunOsctl runs osctl binary with the options provided
|
|
func (cliSuite *CLISuite) RunOsctl(args []string, options ...RunOption) {
|
|
// TODO: add support for calling `osctl config endpoint` before running osctl
|
|
|
|
args = append([]string{"--talosconfig", cliSuite.TalosConfig}, args...)
|
|
|
|
cmd := exec.Command(cliSuite.OsctlPath, args...)
|
|
|
|
Run(&cliSuite.Suite, cmd, options...)
|
|
}
|