Skip to content

Commit

Permalink
Update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Jun 11, 2015
1 parent 57ce67b commit dddaf46
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -5,7 +5,7 @@
- [#2869](https://github.com/influxdb/influxdb/issues/2869): Adding field to existing measurement causes panic
- [#2849](https://github.com/influxdb/influxdb/issues/2849): RC32: Frequent write errors
- [#2700](https://github.com/influxdb/influxdb/issues/2700): Incorrect error message in database EncodeFields

- [#2897](https://github.com/influxdb/influxdb/pull/2897): Ensure target Graphite database exists

## v0.9.0-rc33 [2015-06-09]

Expand Down
16 changes: 14 additions & 2 deletions services/graphite/service_test.go
Expand Up @@ -273,12 +273,17 @@ func Test_ServerGraphiteTCP(t *testing.T) {
},
}
service.PointsWriter = &pointsWriter
service.MetaStore = &DatabaseCreator{}
dbCreator := DatabaseCreator{}
service.MetaStore = &dbCreator

if err := service.Open(); err != nil {
t.Fatalf("failed to open Graphite service: %s", err.Error())
}

if !dbCreator.Created {
t.Fatalf("failed to create target database")
}

// Connect to the graphite endpoint we just spun up
_, port, _ := net.SplitHostPort(service.Addr().String())
conn, err := net.Dial("tcp", "127.0.0.1:"+port)
Expand Down Expand Up @@ -341,12 +346,17 @@ func Test_ServerGraphiteUDP(t *testing.T) {
},
}
service.PointsWriter = &pointsWriter
service.MetaStore = &DatabaseCreator{}
dbCreator := DatabaseCreator{}
service.MetaStore = &dbCreator

if err := service.Open(); err != nil {
t.Fatalf("failed to open Graphite service: %s", err.Error())
}

if !dbCreator.Created {
t.Fatalf("failed to create target database")
}

// Connect to the graphite endpoint we just spun up
_, port, _ := net.SplitHostPort(service.Addr().String())
conn, err := net.Dial("udp", "127.0.0.1:"+port)
Expand Down Expand Up @@ -375,9 +385,11 @@ func (w *PointsWriter) WritePoints(p *cluster.WritePointsRequest) error {
}

type DatabaseCreator struct {
Created bool
}

func (d *DatabaseCreator) CreateDatabaseIfNotExists(name string) (*meta.DatabaseInfo, error) {
d.Created = true
return nil, nil
}

Expand Down

0 comments on commit dddaf46

Please sign in to comment.