* Fixing publish/subscribe race condition in RabbitMQ component.
Added amqpReady function to tests to wait for RabbitMQ readiness.
Tweaks to when subscribed is signaled in the test.
* Update go.mod(s)
* AKV Integration test - WIP
* KeyVault integration test
* Adds network interruption capabilities
* wip
* remove async handling
* Azure Secret Store test
* get with the flow
* Remove network interruption because it is pointless here
* newlines
* Address code review
* Updte Readme to remove section on basic conformance
* Allocate random ports
* Add script to update Azure SQL firewall rules from GitHub meta API
* Update state.azure.sql test to use unique DB names
- Add use of `databaseName` metadata to state.azure.sql test.
- Add dynamic generation of test `databaseName` to conformance.yml to
avoid multiple test instances from racing.
- Add wait before clean-up of Azure SQL DB instance in conformance.yml
to prevent test flakiness and accumulation of undeleted DBs.
- Remove dynamic Azure SQL firewall rule injection from conformance.yml.
- The workflow relies on IPs used by GitHub Actions to be provisioned
in the firewall rules already.
- Update documentation for managing Azure SQL and testing instructions.
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Adds network interruption capabilities
* remove async handling
* update example docstring
* no need for loop
* small optimization
* newline for good measure
* update dapr version
* add state conformance test for postgresql #1117
* make postgresql pass comformance test
* include postgresql to github's workflow
* add newline at end of file for Linux text file
* enhance return
* add newline at end of file for valid Linux text file
* fix lint issue
* handle byte[] in special way so that to stick to json type in DB
* use jsonb instead of json
* fix lint issue
* doesn't allow "", a special case
* enhance assertEquals
* remove unused 'expectedReadResponse' to fix lint issue
* go fmt to fix lint issue
* fix lint issue
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* WIP
* tweaks
* Simplifying runnables
* Increase network timeout
* tweaks
* More tweaks
* Docker compose and structural tweaks
Co-authored-by: tanvigour <60332928+tanvigour@users.noreply.github.com>
* Tweak
* Working Kafka test
* Watcher ordered vs unordered
* Error simulation
* Made port explicit, removed Redis
* package.Run (better naming)
* terraform related changes
* Restructuring certification testing
* Remove copied go-sdk client package
* Fix terraform.go build issues
* Using master of go-sdk
* Using main of go-sdk
* Tweaks per PR
* Adding file headers and some tweaks per PR
* More tweaks
* More comments in Kafka test
Co-authored-by: tanvigour <60332928+tanvigour@users.noreply.github.com>
Co-authored-by: Tanvi Gour <tanvi.gour@gmail.com>
Co-authored-by: tanvigour <>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Simon Leet <31784195+CodeMonkeyLeet@users.noreply.github.com>
* cosmosdb binding - not as flexible as I'd like
conformance tests now pass
* add tests for new UUID injection logic
* Use nested property as partition key value
* avoid repeated string constants
* Disable Identification Hydrator to avoid struct requirement
* Remove struct
* Simplify PR
* Add comments ofor code maintenance
* Add mysql conformance test and fix mysql state to make it pass the test #1122
* remove unused code
* add newline at end of Linux text file
* enhance setValue and relevant unit tests
* fix lint issue
* fix lint issue
* Adding `initialOffset` option to Kafka binding and pubsub components
* Only allow oldest and newest
* Fix tests
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
- Add `OutputData` property to bindings conformance test `TestConfig`.
This is necessary to accommodate bindings like influx, cosmosdbgraph,
alibaba.table and other bindings that require a specific data format.
- Add docker-compose definition and conformance test configuration for
influx binding.
- Add influx bindings to conformance test workflow matrix.
* Fix parameters flag typo in setup-azure-conf-test.sh
* Update Event Hubs conformance tests
- Separate containers and consumer groups used for EventHub pubsub and
bindings conformance tests.
- Update setup-azure-conf-test.sh to reflect new naming targets.
* Add conformance test for EventHubs bindings
* Update EventHubs pubsub to pass conformance tests
- Add conformance tests for Azure EventHubs PubSub component
- Add retry & backoff handling on subscriber handling error to EventHubs
PubSub component for conformance tests.
- Add cancellation context to Azure EventHubs and update Close() to
invoke cancel prior to closing the hub, which cleans up both senders
and receivers.
* Add automation for deploying Azure conformance test resources
- Add .bicep definitions for Azure deployment of conformance test resources.
- Add setup-azure-conf-test.sh script for deploying .bicep definition and
configuring other assets needed for the Azure conformance tests:
- Creates the appropriate service principals and their credentials
for the test.
- Populates the key vault with the test parameters and secrets used by
the GitHub conformance.yml test workflow.
- Generates a .rc file that can be invoked with `source` to configure
the local environment variables and secrets for running conformance
tests described in tests/conformance/README.md.
- Generates a teardown script that can be used to dispose of the
deployed Azure resources when done.
* Move setup-azure-conf-test under azure/ subfolder
* Add documentation for Azure conformance test automation
- Add README.md to .github/infrastructure/conformance/azure describing
use of automation script.
- Update tests/conformance/README.md with reference to Azure
conformance test infrastructure automation.
- Fix spelling and issues in tests/conformance/README.md reported by
markdownlint.
Unlike the other conformance tests, the azure-keyvault.yaml config hardcodes the name of the
target resource which creates an issue for contributors wanting to set up their own test
environments. For example, different users sharing an Azure subscription may not be able
to manage the permissions on the target key vault individually, and will need to edit the
yaml to retarget against their own keyvault instance.
- Add `AzureKeyVaultName` environment variable as the value for `vaultName` in azure-keyvault.yaml
- Update conformance.yml github workflow to require AzureKeyVaultName secret.
* rename ConsumerID to ConsumerGroup
* rename consumerID to consumerGroup
* update the config in the conformance test
* set ConsumerID as alias of ConsumerGroup
* remove extra space
* gofmt
* add ClientID in kafka metadata
* remove ConsumerID field
* gofmt
* Update kafka.go
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* add `Ping` operation.
* add `Ping` implementation of GA components
* add context to an argument for Ping
* add `Ping` implementation of blobstorage
* fix error string for passing lint
* Update blobstorage.go
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Add ETag operation to statestore conformance test
ETags are used to enable concurrency guarantees and are part of the
statestore specification. Not all stores need to use them, however
if the store chooses to, it should be part of the certification
process. This commit adds a simple ETag test scenario that verifies
the basic behaviors of ETags.
https://github.com/dapr/components-contrib/issues/711
* Update tests.yml
* Error on mongodb when etag does not match on delete.
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Refactored the conformance tests to use a new config package
Removed dependency on k8s apimachinery sets
* Comment tweak
* Renamed kit package to internal
* Setting pipefail option in github workflow and purposefully making the Redis test fail to verify that the build fails (as expected)
* Disabling in order processing for Redis (re-disabling) and Azure Service Bus
* Improve conformance tests and add pulsar
* Fix linter error
* Fix linter errors
* Tweaks to pulsar pubsub per PR
* Switching uuid import
* Using Stringer interface to print message keys as base64 in logger
* Disabling some checks w/ Redis pubsub until the component can be enhanced
* Adding comment to eventually remove the simulateErrors option
* Add comment asBase64String to explain what it does
* Adding redelivery (reclaims) to the Redis pubsub component
Removed the temporary simulateErrors flag now that Redis is passing
* Fixing linter issues
* using a wait group instead of a sleep to wait for processing to complete
* More comments and refactoring
* comment tweaks
* Tweaks per PR
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Add conformance test for kafka pubsub + quickfix for Kafka error handling.
* Adding backoff/retry logic to the Kafka pub/sub component
* Add logic to return if error from backoff in kafka.
* Addressing PR comments and lint.
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
* Add state transaction conf test.
* Does not return error for key not found in mongodb.
* Rewrite state conf test.
* Handle []byte in cosmosdb state txn (#664)
Fixes: dapr/dotnet-sdk#579
The issue here is that we had missed the case of pre-marshaled bytes in
the state transaction code path, which would result in the encoding/json
package doing it's normal thing and base64 encoding the data as a JSON
string.
The fix is to use json.RawMessage to avoid that. Turns out this code can
be simplified a bit.
* Fix cosmosdb handling of byte[].
* Fix lint.
* Fix UT for cosmosdb.
* Remove config from state store conf test.
Co-authored-by: Ryan Nowak <nowakra@gmail.com>
* no message
* Removing HTTP input binding from conformance test
* Moving // nolint: noctx
* Fixed linter issue
* Tweaks
* Tweak
* Setting request headers from metadata
* More comments and handling of non-200 response codes
* Fixing conformance test for HTTP
* Temporarily bumping up redis timeouts
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Charlie Stanley <charlie.stanley@microsoft.com>
The http server required for the http binding tests was not up
before the tests began to execute. This change adds a channel to
allow the server to block until it's ready.
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Refactor bindings and introduce input bindings
This commit adds Kafka output bindings tests and refactors the
general bindings tests to include input and output bindings in
the same set of tests. Azure Storage Queues are used as the
first input binding.
* Add http input/output bindings test
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Fix running output bindings with errors
Refactor tests to make it simpler for go test filtering.
Add get operation for blobstorage binding.
* remove unused code
* Add azure service bus conformance tests
Bubble up error on required env var not set
* Update common.go
* Fix running output bindings with errors
* update readme
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Tests MongoDB statestore
* Increase test timeout a bit
* Increase durations even more.
* Clarify the mongodb and redis version
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
This commit adds new conformance tests for output binding components.
Redis is being used as a the introductory binding example.
https://github.com/dapr/components-contrib/issues/409
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>