-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Sean Kao <[email protected]>
- Loading branch information
1 parent
a1d6925
commit 4d8cba9
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
integ-test/src/test/scala/org/opensearch/flint/core/FlintClientBuilderSuite.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.flint.core | ||
|
||
import scala.collection.JavaConverters._ | ||
|
||
import org.opensearch.flint.OpenSearchSuite | ||
import org.scalatest.flatspec.AnyFlatSpec | ||
import org.scalatest.matchers.should.Matchers | ||
|
||
class FlintClientBuilderSuite extends AnyFlatSpec with OpenSearchSuite with Matchers { | ||
|
||
behavior of "Flint client builder" | ||
|
||
it should "build flint client" in { | ||
val flintClient = FlintClientBuilder.build(new FlintOptions(openSearchOptions.asJava)) | ||
flintClient shouldBe a[FlintClient] | ||
} | ||
|
||
it should "fail if cannot instantiate metadata log service" in { | ||
val options = openSearchOptions + (FlintOptions.CUSTOM_FLINT_METADATA_LOG_SERVICE_CLASS -> "org.dummy.Class") | ||
the[RuntimeException] thrownBy { | ||
FlintClientBuilder.build(new FlintOptions(options.asJava)) | ||
} | ||
} | ||
} |