workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

Fix failing integration tests: DockerApiException and PSQL timestamps

Open SergiiKram opened this issue 2 years ago • 0 comments

Describe the change The Docker.DotNet package needs to be updated to be compatible with the latest Docker Desktop releases.

Otherwise, all integration tests fail with the following error:

System.AggregateException : One or more errors occurred. (One or more errors occurred. (One or more errors occurred. (Docker API responded with status code=BadRequest, response=400 Bad Request))) (The following constructor parameters did not have matching fixture data: DynamoDbDockerSetup dockerSetup)
---- System.AggregateException : One or more errors occurred. (One or more errors occurred. (Docker API responded with status code=BadRequest, response=400 Bad Request))
-------- System.AggregateException : One or more errors occurred. (Docker API responded with status code=BadRequest, response=400 Bad Request)
------------ Docker.DotNet.DockerApiException : Docker API responded with status code=BadRequest, response=400 Bad Request

Another issue is PostgreSQL has changed the timestamp behavior, and we need to enable legacy behavior for compatibility.

System.AggregateException : One or more errors occurred. (Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.)
---- System.InvalidCastException : Cannot write DateTime with Kind=Local to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior.

Describe your implementation or design Update the Docker.DotNet package.

Enable legacy timestamp behavior for compatibility.

Tests No need for new tests.

Breaking change No.

SergiiKram avatar May 22 '22 13:05 SergiiKram