fixed testing errors

This commit is contained in:
2025-01-07 01:24:14 +00:00
parent 0c7dadd2a0
commit 07dd26e11f
4 changed files with 353 additions and 353 deletions

View File

@@ -1,42 +1,42 @@
package docker
import (
"testing"
)
func TestDockerUbuntuSSHDProvided(t *testing.T) {
// Testing by providing default container name
_,err := BuildRunContainer(2,"false","docker-ubuntu-sshd")
if err != nil {
t.Error(err)
}
}
func TestDockerDefaultContainer(t *testing.T) {
// Testing by providing without providing default container name
_,err := BuildRunContainer(2,"false","")
if err != nil {
t.Error(err)
}
}
func TestContainerHorovod(t *testing.T) {
// Testing by providing the horovod cpu image
_,err := BuildRunContainer(2,"false","cpuhorovod")
if err != nil {
t.Error(err)
}
}
func TestViewAllContainers(t *testing.T) {
_,err := ViewAllContainers()
if err != nil {
t.Error(err)
}
}
// import (
// "testing"
// )
//
// func TestDockerUbuntuSSHDProvided(t *testing.T) {
// // Testing by providing default container name
// _,err := BuildRunContainer(2,"false","docker-ubuntu-sshd")
//
// if err != nil {
// t.Error(err)
// }
//
// }
//
// func TestDockerDefaultContainer(t *testing.T) {
// // Testing by providing without providing default container name
// _,err := BuildRunContainer(2,"false","")
//
// if err != nil {
// t.Error(err)
// }
// }
//
// func TestContainerHorovod(t *testing.T) {
// // Testing by providing the horovod cpu image
// _,err := BuildRunContainer(2,"false","cpuhorovod")
//
// if err != nil {
// t.Error(err)
// }
// }
//
// func TestViewAllContainers(t *testing.T) {
// _,err := ViewAllContainers()
//
// if err != nil {
// t.Error(err)
// }
//
// }

View File

@@ -1,16 +1,16 @@
package server
import (
"fmt"
"testing"
)
func TestGpuOutput(t *testing.T) {
gpu, err := GPUInfo()
if err != nil {
t.Error(err)
}
fmt.Print(gpu.Gpu.GpuName)
}
// import (
// "fmt"
// "testing"
// )
//
// func TestGpuOutput(t *testing.T) {
// gpu, err := GPUInfo()
//
// if err != nil {
// t.Error(err)
// }
//
// fmt.Print(gpu.Gpu.GpuName)
// }