Browse Source

added travis-ci file

tags/v1.0.0
Ian Babrou 10 years ago
parent
commit
5a651974db
2 changed files with 30 additions and 2 deletions
  1. +22
    -0
      .travis.yml
  2. +8
    -2
      goes_test.go

+ 22
- 0
.travis.yml View File

@@ -0,0 +1,22 @@
language: go

go:
- 1.1
- 1.2
- 1.3
- tip

env:
matrix:
- ES_VERSION=1.0.3
- ES_VERSION=1.1.2
- ES_VERSION=1.2.1

before_script:
- mkdir ${HOME}/elasticsearch
- wget http://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-${ES_VERSION}.tar.gz
- tar -xzf elasticsearch-${ES_VERSION}.tar.gz -C ${HOME}/elasticsearch
- ${HOME}/elasticsearch/elasticsearch-${ES_VERSION}/bin/elasticsearch >/dev/null &

script:
- make test

+ 8
- 2
goes_test.go View File

@@ -585,11 +585,17 @@ func (s *GoesTestSuite) TestIndexStatus(c *C) {
expectedShards := Shard{Total: 2, Successful: 1, Failed: 0}
c.Assert(response.Shards, Equals, expectedShards)

primarySizeInBytes := response.Indices[indexName].Index["primary_size_in_bytes"].(float64)
sizeInBytes := response.Indices[indexName].Index["size_in_bytes"].(float64)

c.Assert(primarySizeInBytes > 0, Equals, true)
c.Assert(sizeInBytes > 0, Equals, true)

expectedIndices := map[string]IndexStatus{
indexName: IndexStatus{
Index: map[string]interface{}{
"primary_size_in_bytes": float64(99),
"size_in_bytes": float64(99),
"primary_size_in_bytes": primarySizeInBytes,
"size_in_bytes": sizeInBytes,
},
Translog: map[string]uint64{
"operations": 0,


Loading…
Cancel
Save