package cmii_operator

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

func TestFetchDemoImages(t *testing.T) {

	errorPullImageList, errorGzipImageList := FetchDemoImages("cqga", 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(OfflineDeployHarborHost)

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