@@ -0,0 +1,1769 @@
+package org.elasticsearch.script;%0A%0Aimport org.elasticsearch.common.settings.ImmutableSettings;%0Aimport org.elasticsearch.common.settings.Settings;%0Aimport org.elasticsearch.test.ElasticsearchIntegrationTest;%0Aimport org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;%0Aimport org.elasticsearch.test.ElasticsearchIntegrationTest.Scope;%0Aimport org.junit.Test;%0A%0Aimport static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_REPLICAS;%0Aimport static org.elasticsearch.cluster.metadata.IndexMetaData.SETTING_NUMBER_OF_SHARDS;%0Aimport static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;%0Aimport static org.hamcrest.Matchers.equalTo;%0A%0A/**%0A */%0A@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)%0Apublic class NoShardsSettingTests extends ElasticsearchIntegrationTest %7B%0A%0A    @Override%0A    public Settings nodeSettings(int nodeOrdinal) %7B%0A        return ImmutableSettings.settingsBuilder()%0A                .put(%22gateway.type%22, %22none%22)%0A                .put(%22index.number_of_shards%22, 1)%0A                .put(%22index.number_of_replicas%22, 0)%0A                .put(super.nodeSettings(nodeOrdinal))%0A                .build();%0A    %7D%0A%0A    @Test%0A    public void testNoOfShards() %7B%0A        assertAcked(prepareCreate(%22test%22).get());%0A        assertThat(client().admin().indices().prepareGetSettings(%22test%22).get().getSetting(%22test%22, %22index.number_of_shards%22), equalTo(%221%22));%0A    %7D%0A%0A    @Override%0A    protected int numberOfShards() %7B%0A        return 1;%0A    %7D%0A%0A    @Override%0A    public Settings indexSettings() %7B%0A        ImmutableSettings.Builder builder = ImmutableSettings.builder();%0A%0A        builder.put(SETTING_NUMBER_OF_SHARDS, 1).build();%0A%0A        builder.put(SETTING_NUMBER_OF_REPLICAS, 0).build();%0A%0A        return builder.build();%0A    %7D%0A%0A%7D%0A

check no of shrads settings