Currently there are two gRPC/test-framework for creating a new API
create_api_definition_request::ApiDefinition::Definition
&
create_api_definition_request::ApiDefinition::Openapi
All the current integration test only test for ApiDefinition::Definition, Add a new test for ApiDefinition::Openapi
In OpenAPI Export for API Definition, Swagger UI Binding PR #1454, There is a RoundTrip test
- Api Definition is created
- Api Definition is Exported as OpenAPI Yaml
- Original Api Definition is deleted
- New Api Definition is imported using the OpenAPI Yaml
- New Api Definition and Original API Definition are checked
It works and Succeeds locally (Ran it a few time), but Fails in Github Workflow (2/2)
ERROR test_export_import_api_definition_fixed{deps=EnvBasedTestDependencies}: golem_common::tracing: panic panic_info=panicked at integration-tests/tests/api/api_definition.rs:722:10:
called `Result::unwrap()` on an `Err` value: ApiDefinitionError { error: Some(BadRequest(ErrorsBody { errors: ["Invalid JSON"] })) }
The error happens in golem-worker-service/src/grpcapi/api_definition
create_api_definition_request::ApiDefinition::Openapi(definition) => {
let converted = OpenApiHttpApiDefinition(
serde_json::from_str(&definition).map_err(|_| bad_request("Invalid JSON"))?,
);
Having a test for create_api_definition_request::ApiDefinition::Openapi would be nice.
Currently there are two gRPC/test-framework for creating a new API
create_api_definition_request::ApiDefinition::Definition&
create_api_definition_request::ApiDefinition::OpenapiAll the current integration test only test for ApiDefinition::Definition, Add a new test for ApiDefinition::Openapi
In OpenAPI Export for API Definition, Swagger UI Binding PR #1454, There is a RoundTrip test
It works and Succeeds locally (Ran it a few time), but Fails in Github Workflow (2/2)
The error happens in golem-worker-service/src/grpcapi/api_definition
Having a test for
create_api_definition_request::ApiDefinition::Openapiwould be nice.