Skip to content

Commit 56613ca

Browse files
committed
Fix alias tests on ES 1.4.0.Beta1
1 parent c5b21be commit 56613ca

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

src/Tests/Nest.Tests.Integration/Indices/AliasTests.cs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,15 +246,21 @@ public void AliasWithFilterPointingToIndex()
246246
var createIndexResponse = this.Client.CreateIndex(indexName, c => c
247247
.NumberOfReplicas(0)
248248
.NumberOfShards(1)
249+
.AddMapping<object>(m => m
250+
.Properties(p => p
251+
.String(s => s.Name("foo"))
252+
)
253+
)
249254
);
250255

251256
createIndexResponse.IsValid.Should().BeTrue();
252257

253258
var aliasResponse = this.Client.Alias(a => a
254259
.Add(aa => aa
255260
.Alias(aliasName)
261+
.Index(indexName)
256262
.IndexRouting("1")
257-
.Filter<dynamic>(f => f.Term("foo", "bar")
263+
.Filter<object>(f => f.Term("foo", "bar")
258264
)
259265
)
260266
);
@@ -278,7 +284,13 @@ public void PutSingleAlias()
278284
var indexName = ElasticsearchConfiguration.NewUniqueIndexName();
279285
var aliasName = ElasticsearchConfiguration.NewUniqueIndexName();
280286

281-
var createIndexResponse = this.Client.CreateIndex(indexName);
287+
var createIndexResponse = this.Client.CreateIndex(indexName, c => c
288+
.AddMapping<ElasticsearchProject>(m => m
289+
.Properties(p => p
290+
.String(s => s.Name(n => n.Name))
291+
)
292+
)
293+
);
282294
createIndexResponse.IsValid.Should().BeTrue();
283295

284296
var result = this.Client.PutAlias(a => a

0 commit comments

Comments
 (0)