mirror of
https://github.com/GlueOps/autoglue.git
synced 2026-02-13 12:50:05 +01:00
feat: complete node pool api, sdk and ui
Signed-off-by: allanice001 <allanice001@gmail.com>
This commit is contained in:
264
sdk/go/test/api_node_pools_test.go
Normal file
264
sdk/go/test/api_node_pools_test.go
Normal file
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
AutoGlue API
|
||||
|
||||
Testing NodePoolsAPIService
|
||||
|
||||
*/
|
||||
|
||||
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
|
||||
|
||||
package autoglue
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
|
||||
openapiclient "github.com/glueops/autoglue-sdk-go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func Test_autoglue_NodePoolsAPIService(t *testing.T) {
|
||||
|
||||
configuration := openapiclient.NewConfiguration()
|
||||
apiClient := openapiclient.NewAPIClient(configuration)
|
||||
|
||||
t.Run("Test NodePoolsAPIService AttachNodePoolAnnotations", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolAnnotations(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService AttachNodePoolLabels", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolLabels(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService AttachNodePoolServers", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolServers(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService AttachNodePoolTaints", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.AttachNodePoolTaints(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService CreateNodePool", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.CreateNodePool(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService DeleteNodePool", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.DeleteNodePool(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService DetachNodePoolAnnotation", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
var annotationId string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolAnnotation(context.Background(), id, annotationId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService DetachNodePoolLabel", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
var labelId string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolLabel(context.Background(), id, labelId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService DetachNodePoolServer", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
var serverId string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolServer(context.Background(), id, serverId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService DetachNodePoolTaint", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
var taintId string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.DetachNodePoolTaint(context.Background(), id, taintId).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService GetNodePool", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.GetNodePool(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService ListNodePoolAnnotations", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolAnnotations(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService ListNodePoolLabels", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolLabels(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService ListNodePoolServers", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolServers(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService ListNodePoolTaints", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePoolTaints(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService ListNodePools", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.ListNodePools(context.Background()).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
t.Run("Test NodePoolsAPIService UpdateNodePool", func(t *testing.T) {
|
||||
|
||||
t.Skip("skip test") // remove to run test
|
||||
|
||||
var id string
|
||||
|
||||
resp, httpRes, err := apiClient.NodePoolsAPI.UpdateNodePool(context.Background(), id).Execute()
|
||||
|
||||
require.Nil(t, err)
|
||||
require.NotNil(t, resp)
|
||||
assert.Equal(t, 200, httpRes.StatusCode)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user