Skip to content

Commit

Permalink
Fix Pinecone WireMock stubs and native support
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Nov 22, 2024
1 parent ea04322 commit e6b87c0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 33 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ IndexDependencyBuildItem indexDependencies() {
void registerForReflection(CombinedIndexBuildItem combinedIndex,
BuildProducer<ReflectiveClassBuildItem> reflectiveClasses) {
Set<String> modelClasses = combinedIndex.getIndex()
.getClassesInPackage(DotName.createSimple("org.openapitools.client.model"))
.getClassesInPackage(DotName.createSimple("org.openapitools.db_control.client.model"))
.stream()
.map(ClassInfo::name)
.map(DotName::toString)
Expand Down
2 changes: 0 additions & 2 deletions integration-tests/pinecone/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@
</dependencies>

<profiles>
<!-- https://github.com/apache/camel-quarkus/issues/6808
<profile>
<id>native</id>
<activation>
Expand Down Expand Up @@ -108,7 +107,6 @@
</plugins>
</build>
</profile>
-->
<profile>
<id>virtualDependencies</id>
<activation>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import io.restassured.http.ContentType;
import org.eclipse.microprofile.config.ConfigProvider;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.openapitools.db_control.client.model.IndexModel;

Expand All @@ -41,7 +40,6 @@

@QuarkusTestResource(PineconeTestResource.class)
@QuarkusTest
@Disabled //https://github.com/apache/camel-quarkus/issues/6808
class PineconeTest {
private static Pinecone pinecone;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id" : "6e869a73-c72a-4ebf-be81-fa920caa99df",
"id" : "0cb5785f-987c-481d-b49a-51dac8cc4a5a",
"name" : "indexes",
"request" : {
"url" : "/indexes",
Expand All @@ -9,19 +9,19 @@
"status" : 200,
"body" : "{\"indexes\":[]}",
"headers" : {
"X-Cloud-Trace-Context" : "a4b91f07ef1a9299382ac69f1b2f8e60",
"X-Cloud-Trace-Context" : "bd4d9cb6698e7373332f57eaeeea6592",
"access-control-allow-origin" : "*",
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "Google Frontend",
"vary" : "origin,access-control-request-method,access-control-request-headers",
"content-type" : "application/json",
"Date" : "Tue, 18 Jun 2024 14:46:24 GMT",
"Date" : "Fri, 22 Nov 2024 09:23:39 GMT",
"Via" : "1.1 google",
"access-control-expose-headers" : "*",
"x-pinecone-api-version" : "2024-04"
"x-pinecone-api-version" : "2024-10",
"access-control-expose-headers" : "*"
}
},
"uuid" : "6e869a73-c72a-4ebf-be81-fa920caa99df",
"uuid" : "0cb5785f-987c-481d-b49a-51dac8cc4a5a",
"persistent" : true,
"scenarioName" : "scenario-1-indexes",
"requiredScenarioState" : "scenario-1-indexes-2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"id" : "764a2311-1f84-43c2-a993-0412caac241b",
"id" : "293cf644-849f-4860-809f-13278d509acb",
"name" : "indexes",
"request" : {
"url" : "/indexes",
"method" : "GET"
},
"response" : {
"status" : 200,
"body" : "{\"indexes\":[{\"name\":\"test-index\",\"metric\":\"cosine\",\"dimension\":3,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"test-index-3ncz9x1.svc.aped-4627-b74a.pinecone.io\",\"spec\":{\"serverless\":{\"region\":\"us-east-1\",\"cloud\":\"aws\"}}}]}",
"body" : "{\"indexes\":[{\"name\":\"test-index\",\"metric\":\"cosine\",\"dimension\":3,\"status\":{\"ready\":true,\"state\":\"Ready\"},\"host\":\"test-index-3ncz9x1.svc.aped-4627-b74a.pinecone.io\",\"spec\":{\"serverless\":{\"region\":\"us-east-1\",\"cloud\":\"aws\"}},\"deletion_protection\":\"disabled\",\"tags\":null}]}",
"headers" : {
"X-Cloud-Trace-Context" : "5160ad22255be98a831fb798589fb58b",
"X-Cloud-Trace-Context" : "5d76189a457047bf315cdd0913392ffe",
"access-control-allow-origin" : "*",
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "Google Frontend",
"vary" : "origin,access-control-request-method,access-control-request-headers",
"content-type" : "application/json",
"Date" : "Tue, 18 Jun 2024 14:46:23 GMT",
"Date" : "Fri, 22 Nov 2024 09:23:37 GMT",
"Via" : "1.1 google",
"access-control-expose-headers" : "*",
"x-pinecone-api-version" : "2024-04"
"x-pinecone-api-version" : "2024-10",
"access-control-expose-headers" : "*"
}
},
"uuid" : "764a2311-1f84-43c2-a993-0412caac241b",
"uuid" : "293cf644-849f-4860-809f-13278d509acb",
"persistent" : true,
"scenarioName" : "scenario-1-indexes",
"requiredScenarioState" : "Started",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
{
"id" : "1635ea23-b8df-42f0-90d6-d30a4fd8205b",
"id" : "5854cd4f-0384-40dd-bfa5-bf36592d3a9b",
"name" : "indexes",
"request" : {
"url" : "/indexes",
"method" : "POST",
"bodyPatterns" : [ {
"equalToJson" : "{\"name\":\"test-index\",\"dimension\":3,\"metric\":\"cosine\",\"spec\":{\"serverless\":{\"cloud\":\"aws\",\"region\":\"us-east-1\"}}}",
"equalToJson" : "{\"name\":\"test-index\",\"dimension\":3,\"metric\":\"cosine\",\"deletion_protection\":\"disabled\",\"spec\":{\"serverless\":{\"cloud\":\"aws\",\"region\":\"us-east-1\"}}}",
"ignoreArrayOrder" : true,
"ignoreExtraElements" : true
} ]
},
"response" : {
"status" : 201,
"body" : "{\"name\":\"test-index\",\"metric\":\"cosine\",\"dimension\":3,\"status\":{\"ready\":false,\"state\":\"Initializing\"},\"host\":\"test-index-3ncz9x1.svc.aped-4627-b74a.pinecone.io\",\"spec\":{\"serverless\":{\"region\":\"us-east-1\",\"cloud\":\"aws\"}}}",
"body" : "{\"name\":\"test-index\",\"metric\":\"cosine\",\"dimension\":3,\"status\":{\"ready\":false,\"state\":\"Initializing\"},\"host\":\"test-index-3ncz9x1.svc.aped-4627-b74a.pinecone.io\",\"spec\":{\"serverless\":{\"region\":\"us-east-1\",\"cloud\":\"aws\"}},\"deletion_protection\":\"disabled\",\"tags\":null}",
"headers" : {
"X-Cloud-Trace-Context" : "f3437adefa70c626b8ec0df59af4542c",
"X-Cloud-Trace-Context" : "7cae6b2507fa30364f1f71182f9319aa",
"access-control-allow-origin" : "*",
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "Google Frontend",
"vary" : "origin,access-control-request-method,access-control-request-headers",
"content-type" : "application/json",
"x-pinecone-operation-id" : "0da16235-9603-4f43-ab57-c6bb1ef44b7b",
"Date" : "Tue, 18 Jun 2024 14:46:21 GMT",
"x-pinecone-operation-id" : "4e23a028-63e6-430d-9c8a-bbfab9596819",
"Date" : "Fri, 22 Nov 2024 09:23:35 GMT",
"Via" : "1.1 google",
"access-control-expose-headers" : "*",
"x-pinecone-api-version" : "2024-04"
"x-pinecone-api-version" : "2024-10",
"access-control-expose-headers" : "*"
}
},
"uuid" : "1635ea23-b8df-42f0-90d6-d30a4fd8205b",
"uuid" : "5854cd4f-0384-40dd-bfa5-bf36592d3a9b",
"persistent" : true,
"insertionIndex" : 4
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id" : "5467c4ff-7174-45cf-a3f6-09ad3fdf02d8",
"id" : "92a8d520-01e3-48ae-89eb-1f51beed3276",
"name" : "indexes_test-index",
"request" : {
"url" : "/indexes/test-index",
Expand All @@ -8,19 +8,19 @@
"response" : {
"status" : 202,
"headers" : {
"X-Cloud-Trace-Context" : "2ffac0de0f46c1527e21dcd301338ad5",
"X-Cloud-Trace-Context" : "99e9c93ac1094bbc1a4df5f322b49a40",
"access-control-allow-origin" : "*",
"Alt-Svc" : "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000",
"Server" : "Google Frontend",
"vary" : "origin,access-control-request-method,access-control-request-headers",
"Date" : "Tue, 18 Jun 2024 14:46:23 GMT",
"Date" : "Fri, 22 Nov 2024 09:23:37 GMT",
"Via" : "1.1 google",
"Content-Type" : "text/html",
"access-control-expose-headers" : "*",
"x-pinecone-api-version" : "2024-04"
"x-pinecone-api-version" : "2024-10",
"access-control-expose-headers" : "*"
}
},
"uuid" : "5467c4ff-7174-45cf-a3f6-09ad3fdf02d8",
"uuid" : "92a8d520-01e3-48ae-89eb-1f51beed3276",
"persistent" : true,
"insertionIndex" : 2
}

0 comments on commit e6b87c0

Please sign in to comment.