ISOs need version AND schema
This commit is contained in:
@@ -26,15 +26,15 @@ func NewKubectl(kubeconfigPath string) *Kubectl {
|
||||
|
||||
// PodInfo represents pod information from kubectl
|
||||
type PodInfo struct {
|
||||
Name string `json:"name"`
|
||||
Status string `json:"status"`
|
||||
Ready string `json:"ready"`
|
||||
Restarts int `json:"restarts"`
|
||||
Age string `json:"age"`
|
||||
Node string `json:"node,omitempty"`
|
||||
IP string `json:"ip,omitempty"`
|
||||
Containers []ContainerInfo `json:"containers,omitempty"`
|
||||
Conditions []PodCondition `json:"conditions,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Status string `json:"status"`
|
||||
Ready string `json:"ready"`
|
||||
Restarts int `json:"restarts"`
|
||||
Age string `json:"age"`
|
||||
Node string `json:"node,omitempty"`
|
||||
IP string `json:"ip,omitempty"`
|
||||
Containers []ContainerInfo `json:"containers,omitempty"`
|
||||
Conditions []PodCondition `json:"conditions,omitempty"`
|
||||
}
|
||||
|
||||
// ContainerInfo represents detailed container information
|
||||
@@ -195,7 +195,7 @@ func (k *Kubectl) GetPods(namespace string, detailed bool) ([]PodInfo, error) {
|
||||
Ready bool `json:"ready"`
|
||||
RestartCount int `json:"restartCount"`
|
||||
State struct {
|
||||
Running *struct{ StartedAt time.Time } `json:"running,omitempty"`
|
||||
Running *struct{ StartedAt time.Time } `json:"running,omitempty"`
|
||||
Waiting *struct{ Reason, Message string } `json:"waiting,omitempty"`
|
||||
Terminated *struct {
|
||||
Reason string
|
||||
|
||||
@@ -31,22 +31,22 @@ func TestNewTalosctl(t *testing.T) {
|
||||
|
||||
func TestTalosconfigBuildArgs(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
name string
|
||||
talosconfigPath string
|
||||
baseArgs []string
|
||||
wantPrefix []string
|
||||
baseArgs []string
|
||||
wantPrefix []string
|
||||
}{
|
||||
{
|
||||
name: "no talosconfig adds no prefix",
|
||||
name: "no talosconfig adds no prefix",
|
||||
talosconfigPath: "",
|
||||
baseArgs: []string{"version", "--short"},
|
||||
wantPrefix: nil,
|
||||
baseArgs: []string{"version", "--short"},
|
||||
wantPrefix: nil,
|
||||
},
|
||||
{
|
||||
name: "with talosconfig adds prefix",
|
||||
name: "with talosconfig adds prefix",
|
||||
talosconfigPath: "/path/to/talosconfig",
|
||||
baseArgs: []string{"version", "--short"},
|
||||
wantPrefix: []string{"--talosconfig", "/path/to/talosconfig"},
|
||||
baseArgs: []string{"version", "--short"},
|
||||
wantPrefix: []string{"--talosconfig", "/path/to/talosconfig"},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -137,12 +137,12 @@ func TestTalosconfigGenConfig(t *testing.T) {
|
||||
|
||||
func TestTalosconfigApplyConfig(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
nodeIP string
|
||||
configFile string
|
||||
insecure bool
|
||||
talosconfigPath string
|
||||
skipTest bool
|
||||
name string
|
||||
nodeIP string
|
||||
configFile string
|
||||
insecure bool
|
||||
talosconfigPath string
|
||||
skipTest bool
|
||||
}{
|
||||
{
|
||||
name: "apply config with all params",
|
||||
|
||||
@@ -370,9 +370,9 @@ func TestYQExec(t *testing.T) {
|
||||
|
||||
func TestCleanYQOutput(t *testing.T) {
|
||||
tests := []struct {
|
||||
name string
|
||||
input string
|
||||
want string
|
||||
name string
|
||||
input string
|
||||
want string
|
||||
}{
|
||||
{
|
||||
name: "removes trailing newline",
|
||||
|
||||
Reference in New Issue
Block a user