Skip to content

Commit ef7c1a3

Browse files
committed
Fix tests
1 parent 0ba337d commit ef7c1a3

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

http/end2end_test.go

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ func TestEnd2End(t *testing.T) {
4040
Log: frames.LogConfig{
4141
Level: "debug",
4242
},
43+
Backends: []*frames.BackendConfig{
44+
{
45+
Name: backendName,
46+
Type: "kv",
47+
},
48+
},
4349
}
4450

4551
port, err := freePort()
@@ -71,8 +77,9 @@ func TestEnd2End(t *testing.T) {
7177

7278
tableName := "e2e"
7379
writeReq := &frames.WriteRequest{
74-
Backend: backendName,
75-
Table: tableName,
80+
Backend: backendName,
81+
Table: tableName,
82+
SaveMode: frames.OverwriteTable,
7683
}
7784

7885
appender, err := client.Write(writeReq)
@@ -118,17 +125,6 @@ func TestEnd2End(t *testing.T) {
118125
}
119126

120127
testGrafana(t, url, backendName, tableName)
121-
122-
// Exec
123-
execReq := &pb.ExecRequest{
124-
Backend: backendName,
125-
Table: tableName,
126-
Command: "ping",
127-
}
128-
129-
if _, err := client.Exec(execReq); err != nil {
130-
t.Fatalf("can't exec - %s", err)
131-
}
132128
}
133129

134130
func testGrafana(t *testing.T, baseURL string, backend string, table string) {

http/server_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ const (
3434
)
3535

3636
func createServer() (*Server, error) {
37-
cfg := &frames.Config{}
37+
cfg := &frames.Config{
38+
Backends: []*frames.BackendConfig{
39+
{
40+
Name: "weather",
41+
Type: "kv",
42+
},
43+
},
44+
}
3845
address := ":8080"
3946
return NewServer(cfg, address, nil, nil, "")
4047
}

0 commit comments

Comments
 (0)