package api

import (
	"fmt"
	"net/http"
	"net/http/httptest"
	"testing"

	"github.com/pingcap/dbaas/central/db/entity"
	"github.com/stretchr/testify/assert"
)

func TestGetPublicClusterProfiles(t *testing.T) {
	url := fmt.Sprintf("/external-api/v1/cluster_profiles/%s/profiles", entity.Aws.String())
	w := httptest.NewRecorder()
	req, _ := http.NewRequest("GET", url, nil)
	router.ServeHTTP(w, req)
	assert.Equalf(t, 404, w.Code, w.Body.String())

	url = fmt.Sprintf("/external-api/v1/cluster_profiles/%s/profiles", entity.Gcp.String())
	w = httptest.NewRecorder()
	req, _ = http.NewRequest("GET", url, nil)
	router.ServeHTTP(w, req)
	assert.Equalf(t, 404, w.Code, w.Body.String())
}
