package message_pusher

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

func TestClient_Publish(t *testing.T) {

	client := NewDefaultClient()

	optionList := []PublishOption{
		WithTitle("测试内容"),
		WithPriority("5"),
		WithMarkdown(),
	}

	deployPush := DeployPush{
		Namespace:    "uavcloud-dev",
		AppName:      "cmii-uav-platform",
		Replicas:     "1",
		DeployStatus: false,
	}

	deployPush.ParseCmiiDeployTemplate()

	message, err := client.PublishDefault(deployPush.ParseCmiiDeployTemplate(), optionList)
	if err != nil {
		return
	}

	utils.BeautifulPrint(message)

}
