Skip to content

Commit

Permalink
looks like StatusNoContent writes {} by default
Browse files Browse the repository at this point in the history
  • Loading branch information
neonstalwart committed Apr 15, 2015
1 parent 894d198 commit 5d2b738
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmd/influxd/server_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1468,7 +1468,7 @@ func TestClientLibrary(t *testing.T) {
name: "no points",
writes: []write{
{
expected: `null`,
expected: `{}`,
bp: client.BatchPoints{Database: "mydb"},
},
},
Expand All @@ -1483,7 +1483,7 @@ func TestClientLibrary(t *testing.T) {
{Name: "cpu", Fields: map[string]interface{}{"value": 1.1}, Timestamp: now},
},
},
expected: `null`,
expected: `{}`,
},
},
queries: []query{
Expand All @@ -1496,9 +1496,9 @@ func TestClientLibrary(t *testing.T) {
{
name: "mulitple points, multiple values",
writes: []write{
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.1, "tx": 2.1}, Timestamp: now}}}, expected: `null`},
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.2, "tx": 2.2}, Timestamp: now.Add(time.Nanosecond)}}}, expected: `null`},
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.3, "tx": 2.3}, Timestamp: now.Add(2 * time.Nanosecond)}}}, expected: `null`},
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.1, "tx": 2.1}, Timestamp: now}}}, expected: `{}`},
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.2, "tx": 2.2}, Timestamp: now.Add(time.Nanosecond)}}}, expected: `{}`},
{bp: client.BatchPoints{Database: "mydb", Points: []client.Point{{Name: "network", Fields: map[string]interface{}{"rx": 1.3, "tx": 2.3}, Timestamp: now.Add(2 * time.Nanosecond)}}}, expected: `{}`},
},
queries: []query{
{
Expand Down

0 comments on commit 5d2b738

Please sign in to comment.