Files
ProjectOctopus/agent-go/a_executor/ImageFunction_test.go
2024-06-14 10:37:40 +08:00

26 lines
658 B
Go
Executable File

package a_executor
import (
"fmt"
"strconv"
"testing"
"wdd.io/agent-common/utils"
)
func TestAgentOsOperator_Sync(t *testing.T) {
// imageFullName gzipFolderPrefix gzipFileName ossUrlPrefix proxyUrl targetHarborHost namespace targetImageFullName
funcArgs := []string{
"harbor.cdcyy.com.cn/cmii/busybox:0326",
"/var/lib/docker/octopus_image/",
"cmlc=cmii=busybox=0326.tar.gz",
"https://oss.demo.uavcmlc.com:18000/cmlc-installation/tmp/",
"",
"10.250.0.100",
"",
}
sync, strings := agentOP.Sync("PUSH_IMAGE_TO_TARGET_HARBOR", funcArgs...)
fmt.Println("func result are => " + strconv.FormatBool(sync))
utils.BeautifulPrint(strings)
}