Skip to content

Commit

Permalink
Cover the last of the unit test gaps.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaffinito committed Jan 21, 2025
1 parent eb1cf48 commit 2320fb4
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,26 @@ public static void TearDown()
_compositeTestAgent.Dispose();
}

// Path no underscore
[TestCase("PUT", "my-index", "_search", "Search", false, DatastoreVendor.OpenSearch)]
[TestCase("GET", "search", "scroll", "Scroll", false, DatastoreVendor.OpenSearch)]
[TestCase("PUT", "my-index", "_search", null, false, DatastoreVendor.OpenSearch)]
[TestCase("PUT", "my-index", "/third", null, false, DatastoreVendor.OpenSearch)]
[TestCase("GET", "search", "scroll", null, false, DatastoreVendor.OpenSearch)]

// Path with underscore
[TestCase("PUT", "_my-index", "_search", "Search", false, DatastoreVendor.OpenSearch)]
[TestCase("GET", "_search", "scroll", "Scroll", false, DatastoreVendor.OpenSearch)]
[TestCase("PUT", "_my-index", "_search", null, false, DatastoreVendor.OpenSearch)]
[TestCase("PUT", "_my-index", "/third", null, false, DatastoreVendor.OpenSearch)]
[TestCase("GET", "_search", "scroll", null, false, DatastoreVendor.OpenSearch)]

// Test different request operations
[TestCase("DELETE", "_search", "scroll", null, false, DatastoreVendor.OpenSearch)]
[TestCase("POST", "_doc", "index", null, false, DatastoreVendor.OpenSearch)]
[TestCase("HEAD", "_mtermvectors", "index", null, false, DatastoreVendor.OpenSearch)]

// Test empty paths
[TestCase("PUT", null, null, "Search", false, DatastoreVendor.OpenSearch)]
public void Test_BuildSegment_TryProcessResponse_Success(string request, string path, string operationData,
string requestParams, bool isAsync, DatastoreVendor datastoreVendor)
Expand Down

0 comments on commit 2320fb4

Please sign in to comment.