package cmii_operator

import (
	"testing"
	"wdd.io/agent-go/utils"
)

func TestFetchDemoImages(t *testing.T) {

	errorPullImageList, errorGzipImageList := FetchDemoImages("shls", true)

	utils.BeautifulPrintListWithTitle(errorPullImageList, "cmii errorPullImageList")
	utils.BeautifulPrintListWithTitle(errorGzipImageList, "cmii errorGzipImageList")

}

func TestFetchVersionImages(t *testing.T) {
	errorPullImageList, errorGzipImageList := FetchVersionImages("5.4.0", true)

	utils.BeautifulPrintListWithTitle(errorPullImageList, "cmii errorPullImageList")
	utils.BeautifulPrintListWithTitle(errorGzipImageList, "cmii errorGzipImageList")
}

func TestFetchDependencyRepos(t *testing.T) {

	errorPullImageList, errorGzipImageList := FetchDependencyRepos(true)

	utils.BeautifulPrintListWithTitle(errorPullImageList, "dep errorPullImageList")
	utils.BeautifulPrintListWithTitle(errorGzipImageList, "dep errorGzipImageList")

}

func TestLoadSplitGzipImageToTargetHarbor(t *testing.T) {
	errorLoadImageNameList, errorPushImageNameList := LoadSplitGzipImageToTargetHarbor("cqga", OfflineDeployHarborHost)

	utils.BeautifulPrintListWithTitle(errorLoadImageNameList, "errorLoadImageNameList")
	utils.BeautifulPrintListWithTitle(errorPushImageNameList, "errorPushImageNameList")
}

func TestLoadSplitDepGzipImageToTargetHarbor(t *testing.T) {
	errorLoadImageNameList, errorPushImageNameList := LoadSplitDepGzipImageToTargetHarbor(DirectPushDeployHarborHost)

	utils.BeautifulPrintListWithTitle(errorLoadImageNameList, "errorLoadImageNameList")
	utils.BeautifulPrintListWithTitle(errorPushImageNameList, "errorPushImageNameList")
}
