Added postgres conformance test for binding (#2034)
* Added postgres conformance test for binding Signed-off-by: Amulya Varote <amulyavarote@microsoft.com> * Added quotations to the connection string Signed-off-by: Amulya Varote <amulyavarote@microsoft.com> * Added postgres docker for bindings Signed-off-by: Amulya Varote <amulyavarote@microsoft.com> * Changes based on the review comment Signed-off-by: Amulya Varote <amulyavarote@microsoft.com> Signed-off-by: Amulya Varote <amulyavarote@microsoft.com> Co-authored-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
This commit is contained in:
parent
d630c03885
commit
57e4ca0f29
|
@ -45,6 +45,7 @@ jobs:
|
|||
- bindings.mqtt-emqx
|
||||
- bindings.mqtt-mosquitto
|
||||
- bindings.mqtt-vernemq
|
||||
- bindings.postgres
|
||||
- bindings.redis
|
||||
- bindings.rabbitmq
|
||||
- pubsub.aws.snssqs
|
||||
|
@ -296,7 +297,7 @@ jobs:
|
|||
- name: Start postgresql
|
||||
run: |
|
||||
docker-compose -f ./.github/infrastructure/docker-compose-postgresql.yml -p postgresql up -d
|
||||
if: contains(matrix.component, 'postgresql')
|
||||
if: contains(matrix.component, 'postgres')
|
||||
|
||||
- name: Start cassandra
|
||||
run: |
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
apiVersion: dapr.io/v1alpha1
|
||||
kind: Component
|
||||
metadata:
|
||||
name: postgres-binding
|
||||
spec:
|
||||
type: bindings.postgres
|
||||
version: v1
|
||||
metadata:
|
||||
- name: url # Required
|
||||
value: "host=localhost user=postgres password=example port=5432 connect_timeout=10 database=dapr_test"
|
|
@ -57,3 +57,6 @@ components:
|
|||
operations: ["create", "operations", "read"]
|
||||
config:
|
||||
checkInOrderProcessing: false
|
||||
- component: postgres
|
||||
allOperations: false
|
||||
operations: [ "exec", "query", "close", "operations" ]
|
|
@ -45,6 +45,7 @@ import (
|
|||
b_influx "github.com/dapr/components-contrib/bindings/influx"
|
||||
b_kafka "github.com/dapr/components-contrib/bindings/kafka"
|
||||
b_mqtt "github.com/dapr/components-contrib/bindings/mqtt"
|
||||
b_postgres "github.com/dapr/components-contrib/bindings/postgres"
|
||||
b_rabbitmq "github.com/dapr/components-contrib/bindings/rabbitmq"
|
||||
b_redis "github.com/dapr/components-contrib/bindings/redis"
|
||||
p_snssqs "github.com/dapr/components-contrib/pubsub/aws/snssqs"
|
||||
|
@ -475,6 +476,8 @@ func loadOutputBindings(tc TestComponent) bindings.OutputBinding {
|
|||
binding = b_mqtt.NewMQTT(testLogger)
|
||||
case "rabbitmq":
|
||||
binding = b_rabbitmq.NewRabbitMQ(testLogger)
|
||||
case "postgres":
|
||||
binding = b_postgres.NewPostgres(testLogger)
|
||||
default:
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue