mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 14:57:16 +08:00
32 lines
496 B
Go
32 lines
496 B
Go
package api
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/suite"
|
|
|
|
"github.com/TheTNB/panel/internal/panel"
|
|
)
|
|
|
|
type APITestSuite struct {
|
|
suite.Suite
|
|
api *API
|
|
}
|
|
|
|
func TestAPITestSuite(t *testing.T) {
|
|
panel.Version = "2.3.0"
|
|
suite.Run(t, &APITestSuite{
|
|
api: NewAPI(),
|
|
})
|
|
}
|
|
|
|
func (s *APITestSuite) TestGetLatestVersion() {
|
|
_, err := s.api.GetLatestVersion()
|
|
s.NoError(err)
|
|
}
|
|
|
|
func (s *APITestSuite) TestGetVersionsLog() {
|
|
_, err := s.api.GetIntermediateVersions()
|
|
s.NoError(err)
|
|
}
|