File tree 2 files changed +28
-2
lines changed
src/test/java/org/opensearch/flowframework/rest
2 files changed +28
-2
lines changed Original file line number Diff line number Diff line change @@ -494,7 +494,29 @@ List<Provider<RegularFile>> plugins = [
494
494
return new RegularFile () {
495
495
@Override
496
496
File getAsFile () {
497
- return configurations. zipArchive. asFileTree. getFiles()
497
+ return configurations. zipArchive. asFileTree. matching{include " **/opensearch-ml-plugin-${ opensearch_build} .zip" }. getSingleFile()
498
+ }
499
+ }
500
+ }
501
+ }),
502
+ provider(new Callable<RegularFile > (){
503
+ @Override
504
+ RegularFile call () throws Exception {
505
+ return new RegularFile () {
506
+ @Override
507
+ File getAsFile () {
508
+ return configurations. zipArchive. asFileTree. matching{include " **/opensearch-knn-${ opensearch_build} .zip" }. getSingleFile()
509
+ }
510
+ }
511
+ }
512
+ }),
513
+ provider(new Callable<RegularFile > (){
514
+ @Override
515
+ RegularFile call () throws Exception {
516
+ return new RegularFile () {
517
+ @Override
518
+ File getAsFile () {
519
+ return configurations. zipArchive. asFileTree. matching{include " **/neural-search-${ opensearch_build} .zip" }. getSingleFile()
498
520
}
499
521
}
500
522
}
Original file line number Diff line number Diff line change @@ -525,7 +525,11 @@ public void testAllDefaultUseCasesCreation() throws Exception {
525
525
}
526
526
527
527
public void testSemanticSearchWithLocalModelEndToEnd () throws Exception {
528
-
528
+ // Checking if plugins are part of the integration test cluster so we can continue with this test
529
+ List <String > plugins = catPlugins ();
530
+ if (!plugins .contains ("opensearch-knn" ) && plugins .contains ("opensearch-neural-search" )) {
531
+ return ;
532
+ }
529
533
Map <String , Object > defaults = new HashMap <>();
530
534
defaults .put ("register_local_pretrained_model.name" , "huggingface/sentence-transformers/all-MiniLM-L6-v2" );
531
535
defaults .put ("register_local_pretrained_model.version" , "1.0.1" );
You can’t perform that action at this time.
0 commit comments