* conformance tests
Signed-off-by: Amit Mor <amit.mor@hotmail.com>
* latest localstack. snssqs to conformance list
Signed-off-by: Amit Mor <amit.mor@hotmail.com>
Co-authored-by: Mukundan Sundararajan <musundar@microsoft.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
* - Introduce `fmt.Sprintf` where applicable
- Add conformance test for cassandra component.
Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>
* Start cassandra via docker-compose for its conformance test
Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>
* Apply `go fmt` on `tests/conformance/common.go` as part of PR correction
Signed-off-by: mbimbij <joseph.mbimbi@gmail.com>
* Fix test infrastructure setup script
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
* use more unique ACR resource name
Signed-off-by: Bernd Verst <4535280+berndverst@users.noreply.github.com>
Co-authored-by: Looong Dai <long.dai@intel.com>
* Add certification tests for ASB Queue binding
This commit adds certification tests for the Azure Service Bus Queue
Input/Output binding. This utilizes the new certification framework
and performs a series of tests as described in the test plan readme.
The general purpose of these tests is to serve as an integration test
and as such requires an actual Azure Service Bus connection and a
Dapr sidecar.
https://github.com/dapr/components-contrib/issues/957
* Add to github workflow and fix formatting
* Fix dependencies
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
Co-authored-by: Long Dai <long.dai@intel.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
Co-authored-by: Dapr Bot <56698301+dapr-bot@users.noreply.github.com>
The existing Skip Duplicate Actions pre-job will effectively ignore the
command `/ok-to-test` from repository_dispatch because the testing
triggered by a PR will usually be seen as transferrable, even though
the intention for `/ok-to-test` is to run a superset of tests triggered
by the PR.
To fix this, both the conformance and certification workflows will
always generate the test matrix if the trigger is a respository_dispatch
regardless of the test duplication check.
* 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>
* 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>
- Add removal of AKV_SPAUTH_SP to generated teardown script.
- Fix extraction of `clientId` and `clientSecret` from provided
credentials without line breaks.
* 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
- 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.
Align test log reporting with dapr/dapr E2E tests so that maintainers
can start applying the same analytics tools to the test results across
Dapr projects.
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* 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.
* ci: add stale bot
Signed-off-by: Long Dai <long0dai@foxmail.com>
* feedback
Signed-off-by: Long Dai <long0dai@foxmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* 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.
- Add security reporting link as comment to all issue templates
- Add config.yml with security reporting and other contact info
- Fix name collision in feature_request and discussion templates
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Use `go mod tidy` before make
I have the issue with go 1.16 that I cannot build dapr because of a lot of errors with the message:
```
missing go.sum entry for module providing package ...
```
Maybe it's because of this issue: https://github.com/golang/go/issues/44129
Executing `go mod tidy` fixed it for me.
* Update mod tidy check equal to the one used in dapr/dapr
Co-authored-by: Yaron Schneider <yaronsc@microsoft.com>
Co-authored-by: Phil Kedy <phil.kedy@gmail.com>
Co-authored-by: Artur Souza <artursouza.ms@outlook.com>
* Increasing overall test timeout to allow for conformance tests to run
* Download Go dependencies before running go test so that the time spent downloading does not count against the testing timeout
* Tweak
* Testing if `go mod download` improves overall github actions time
* Tweak
* 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>
* 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>
* Add CodeCov GitHub Action
* Address Sundar's comment about blocking on coverage.
Since currently testing of components-contrib usually require building
with dapr/dapr, we don't yet have a lot of coverage. So we shouldn't
block PRs based on that.
* Initial commit
* Fixed all linting error
* Used prepared query instead of string format
* Enabled linter for test
Enabled below linters
- gochecknoglobals
- gochecknoinits
* Enabled below linters
- godox
- interfacer
- maligned
* Revert name change for StateStore in pkg state
* Incorporate review comments
* Cleanup the github ci
* Correct typo
* Add golangci-lint version in github ci step
* Update Readme.md