forked from aliyun/aliyun-log-go-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient_dashboard_test.go
47 lines (39 loc) · 1.07 KB
/
client_dashboard_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package sls
import (
"os"
"testing"
"github.com/stretchr/testify/suite"
)
func TestDashboard(t *testing.T) {
suite.Run(t, new(DashboardTestSuite))
}
type DashboardTestSuite struct {
suite.Suite
endpoint string
projectName string
logstoreName string
accessKeyID string
accessKeySecret string
client Client
}
func (s *DashboardTestSuite) SetupSuite() {
s.endpoint = os.Getenv("LOG_TEST_ENDPOINT")
s.projectName = os.Getenv("LOG_TEST_PROJECT")
s.logstoreName = os.Getenv("LOG_TEST_LOGSTORE")
s.accessKeyID = os.Getenv("LOG_TEST_ACCESS_KEY_ID")
s.accessKeySecret = os.Getenv("LOG_TEST_ACCESS_KEY_SECRET")
s.client.AccessKeyID = s.accessKeyID
s.client.AccessKeySecret = s.accessKeySecret
s.client.Endpoint = s.endpoint
s.Nil(makeSureLogstoreExist(&s.client, s.projectName, s.logstoreName))
}
func (s *DashboardTestSuite) TearDownSuite() {
//err := s.client.DeleteMachineGroup(s.projectName, s.machineGroupName)
//s.Nil(err)
}
func (s *DashboardTestSuite) TestDashboard() {
// @todo
}
func (s *DashboardTestSuite) TestChart() {
// @todo
}