mirror of
https://github.com/openshift/openshift-mcp-server.git
synced 2025-10-17 14:27:48 +03:00
test: support for 1.24 toolchain
This commit is contained in:
@@ -4,8 +4,7 @@ import (
|
||||
"os"
|
||||
)
|
||||
|
||||
//goland:noinspection GoTestName
|
||||
func ExampleVersion() {
|
||||
func Example_version() {
|
||||
oldArgs := os.Args
|
||||
defer func() { os.Args = oldArgs }()
|
||||
os.Args = []string{"kubernetes-mcp-server", "--version"}
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,6 +1,6 @@
|
||||
module github.com/manusa/kubernetes-mcp-server
|
||||
|
||||
go 1.23.5
|
||||
go 1.24.1
|
||||
|
||||
require (
|
||||
github.com/fsnotify/fsnotify v1.8.0
|
||||
|
||||
@@ -51,7 +51,7 @@ func TestProjectsListInOpenShift(t *testing.T) {
|
||||
defer c.inOpenShift()() // n.b. two sets of parentheses to invoke the first function
|
||||
c.mcpServer.server.AddTools(c.mcpServer.initNamespaces()...)
|
||||
dynamicClient := dynamic.NewForConfigOrDie(envTestRestConfig)
|
||||
_, err := dynamicClient.Resource(schema.GroupVersionResource{Group: "project.openshift.io", Version: "v1", Resource: "projects"}).
|
||||
_, _ = dynamicClient.Resource(schema.GroupVersionResource{Group: "project.openshift.io", Version: "v1", Resource: "projects"}).
|
||||
Create(c.ctx, &unstructured.Unstructured{Object: map[string]interface{}{
|
||||
"apiVersion": "project.openshift.io/v1",
|
||||
"kind": "Project",
|
||||
@@ -59,7 +59,6 @@ func TestProjectsListInOpenShift(t *testing.T) {
|
||||
"name": "an-openshift-project",
|
||||
},
|
||||
}}, metav1.CreateOptions{})
|
||||
println(err)
|
||||
toolResult, err := c.callTool("projects_list", map[string]interface{}{})
|
||||
t.Run("projects_list returns project list", func(t *testing.T) {
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user