mirror of
https://github.com/containers/kubernetes-mcp-server.git
synced 2025-10-23 01:22:57 +03:00
test(profiles): test default profile is full
This commit is contained in:
@@ -3,6 +3,7 @@ package cmd
|
|||||||
import (
|
import (
|
||||||
"io"
|
"io"
|
||||||
"os"
|
"os"
|
||||||
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -24,6 +25,13 @@ func TestVersion(t *testing.T) {
|
|||||||
version, err := captureOutput(rootCmd.Execute)
|
version, err := captureOutput(rootCmd.Execute)
|
||||||
if version != "0.0.0\n" {
|
if version != "0.0.0\n" {
|
||||||
t.Fatalf("Expected version 0.0.0, got %s %v", version, err)
|
t.Fatalf("Expected version 0.0.0, got %s %v", version, err)
|
||||||
return
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestDefaultProfile(t *testing.T) {
|
||||||
|
rootCmd.SetArgs([]string{"--version", "--log-level=1"})
|
||||||
|
out, err := captureOutput(rootCmd.Execute)
|
||||||
|
if !strings.Contains(out, "Starting kubernetes-mcp-server with profile: full") {
|
||||||
|
t.Fatalf("Expected profile 'full', got %s %v", out, err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user