package test

import (
	"github.com/pingcap/dbaas/billing2/config"
	"github.com/pingcap/dbaas/billing2/handler/cloudproviderhandler"
	"github.com/pingcap/dbaas/billing2/utils/log"
	"go.uber.org/zap"
	"testing"
)

func TestAzurePrice(t *testing.T) {
	t.Skip()
	config.Get().Set(config.AzureSkuPriceQueryEnable, true)
	config.Get().Set(config.AzureSkuPriceQueryUrl, "https://prices.azure.com/api/retail/prices")
	providerPriceHandler := &cloudproviderhandler.AzurePriceHandlerImpl{}
	res, err := providerPriceHandler.GetPrice(map[string]string{
		"service_code": "AVM_Compute",
		"region":       "eastus2",
		"instanceType": "Standard_D2s_v5",
	})
	if err != nil {
		log.Error("TestPrice2", zap.Error(err))
		return
	} else {
		log.Info("TestPrice2", zap.String("price ", res.Price.String()))
	}

}
