@@ -93,12 +93,29 @@ func (a *ReadingClickHouseTablesIntegrationTestcase) testWildcardGoesToElastic(c
9393func (a * ReadingClickHouseTablesIntegrationTestcase ) testIngestIsDisabled (ctx context.Context , t * testing.T ) {
9494 // There is no ingest pipeline, so Quesma should reject all ingest requests
9595 for _ , tt := range []string {"test_table" , "extra_index" } {
96- t .Run (tt , func (t * testing.T ) {
96+ t .Run (tt + "_doc" , func (t * testing.T ) {
9797 resp , bodyBytes := a .RequestToQuesma (ctx , t , "POST" , fmt .Sprintf ("/%s/_doc" , tt ), []byte (`{"name": "Piotr", "age": 11111}` ))
9898 assert .Contains (t , string (bodyBytes ), "index_closed_exception" )
9999 assert .Equal (t , http .StatusOK , resp .StatusCode )
100100 assert .Equal (t , "Clickhouse" , resp .Header .Get ("X-Quesma-Source" ))
101101 assert .Equal (t , "Elasticsearch" , resp .Header .Get ("X-Elastic-Product" ))
102102 })
103103 }
104+
105+ for _ , tt := range []string {"test_table" , "extra_index" } {
106+ t .Run (tt + "_bulk" , func (t * testing.T ) {
107+
108+ bulkPayload := []byte (fmt .Sprintf (`
109+ { "index": { "_index": "%s", "_id": "1" } }
110+ { "name": "Alice", "age": 30 }
111+ ` , tt ))
112+
113+ resp , bodyBytes := a .RequestToQuesma (ctx , t , "POST" , "/_bulk" , bulkPayload )
114+ assert .Contains (t , string (bodyBytes ), "index_closed_exception" )
115+ assert .Equal (t , http .StatusOK , resp .StatusCode )
116+ assert .Equal (t , "Clickhouse" , resp .Header .Get ("X-Quesma-Source" ))
117+ assert .Equal (t , "Elasticsearch" , resp .Header .Get ("X-Elastic-Product" ))
118+ })
119+ }
120+
104121}
0 commit comments