cc-backend/internal/api/0.0.37/test/api_slurm_test.go

192 lines
4.5 KiB
Go

/*
Slurm Rest API
Testing SlurmAPIService
*/
// Code generated by OpenAPI Generator (https://openapi-generator.tech);
package openapi
import (
"context"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"testing"
openapiclient "github.com/GIT_USER_ID/GIT_REPO_ID"
)
func Test_openapi_SlurmAPIService(t *testing.T) {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
t.Run("Test SlurmAPIService SlurmctldCancelJob", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var jobId string
httpRes, err := apiClient.SlurmAPI.SlurmctldCancelJob(context.Background(), jobId).Execute()
require.Nil(t, err)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldDiag", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldDiag(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetJob", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var jobId string
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetJob(context.Background(), jobId).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetJobs", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetJobs(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetNode", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var nodeName string
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetNode(context.Background(), nodeName).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetNodes", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetNodes(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetPartition", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var partitionName string
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetPartition(context.Background(), partitionName).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetPartitions", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetPartitions(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetReservation", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var reservationName string
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetReservation(context.Background(), reservationName).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldGetReservations", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldGetReservations(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldPing", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldPing(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldSubmitJob", func(t *testing.T) {
t.Skip("skip test") // remove to run test
resp, httpRes, err := apiClient.SlurmAPI.SlurmctldSubmitJob(context.Background()).Execute()
require.Nil(t, err)
require.NotNil(t, resp)
assert.Equal(t, 200, httpRes.StatusCode)
})
t.Run("Test SlurmAPIService SlurmctldUpdateJob", func(t *testing.T) {
t.Skip("skip test") // remove to run test
var jobId string
httpRes, err := apiClient.SlurmAPI.SlurmctldUpdateJob(context.Background(), jobId).Execute()
require.Nil(t, err)
assert.Equal(t, 200, httpRes.StatusCode)
})
}