diff --git a/.github/workflows/conformance.yml b/.github/workflows/conformance.yml index 279fbd1ca..b1cad2f8d 100644 --- a/.github/workflows/conformance.yml +++ b/.github/workflows/conformance.yml @@ -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: | diff --git a/tests/config/bindings/postgres/bindings.yml b/tests/config/bindings/postgres/bindings.yml new file mode 100644 index 000000000..be68503ba --- /dev/null +++ b/tests/config/bindings/postgres/bindings.yml @@ -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" diff --git a/tests/config/bindings/tests.yml b/tests/config/bindings/tests.yml index 0d21a0ec3..ba3d7793e 100644 --- a/tests/config/bindings/tests.yml +++ b/tests/config/bindings/tests.yml @@ -56,4 +56,7 @@ components: - component: rabbitmq operations: ["create", "operations", "read"] config: - checkInOrderProcessing: false \ No newline at end of file + checkInOrderProcessing: false + - component: postgres + allOperations: false + operations: [ "exec", "query", "close", "operations" ] \ No newline at end of file diff --git a/tests/conformance/common.go b/tests/conformance/common.go index 0ea9119dd..94b260891 100644 --- a/tests/conformance/common.go +++ b/tests/conformance/common.go @@ -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 }