Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.35k stars 1.99k forks source link

[FEATURE REQ]Add integration tests for Spring Cloud Azure #29717

Closed Netyyyy closed 2 years ago

Netyyyy commented 2 years ago

Context

In Spring Cloud Azure 4.0, we dropped many Integration tests of Spring Cloud Azure Starter, now we want them back to help check our codes. But this time we will do it another way, aggragate all in one.

Goal

https://github.com/Azure/azure-sdk-for-java/issues/29717#issuecomment-1182924829

Solution

  1. Create a new module named spring-cloud-azure-integration-tests
  2. Bring all IT together, each IT will have a separate package, such as servicebus-binder
  3. Their properties file will be renamed to be unique and consistent with their code package, such as application-service-bus-binder-single.yml
  4. Their test-resources.json file will be added to such package test-resources/servicebus-binder
Netyyyy commented 2 years ago

Goal:

Create a test project

This project will test

Connectivity of autoconfigured sdk clients

  1. Spring Cloud Azure autoconfigured appconfiguration sdk client
    • [x] get a configuration from appconfiguration service via the sdk client
  2. Spring Cloud Azure autoconfigured cosmos sdk client
    • [x] insert one record to cosmos table using cosmos sdk client
    • [x] query inserted record from cosmos table using cosmos sdk client
    • [x] delete inserted record from cosmos table using cosmos sdk client
  3. Spring Cloud Azure autoconfigured eventhubs sdk clients
    • [x] producing one event to Event Hubs service via eventhubs producer client
    • [x] consuming one event from Event Hubs service via eventhubs consumer client
    • [x] processing and check-pointing one event from Event Hubs service via event processor client
  4. Spring Cloud Azure autoconfigured keyvault secrets sdk client
    • [x] set one secret to Key Vault Secrets using secret client
    • [x] get one secret from Key Vault Secrets using secret client
  5. Spring Cloud Azure autoconfigured service bus sdk clients
    • [x] producing one message to Service Bus service via servicebus sender client
    • [x] consuming one message from Service Bus service via servicebus receiver client
    • [x] processing one message from Service Bus service via servicebus processor client
  6. Spring Cloud Azure autoconfigured storage blob sdk client
    • [x] upload a string to Storage Blob using storage blob client
    • [x] read a blob from Storage Blob using storage blob client
  7. Spring Cloud Azure autoconfigured storage file share sdk client
    • [x] upload a string to Storage File Share using storage file share client
    • [x] read a file from Storage File Share using storage file share client
  8. Spring Cloud Azure autoconfigured storage queue sdk client
    • [x] send a message to Storage Queue using storage queue client
    • [x] receive a message from Storage Queue using storage queue client
  9. [Optional] Spring Cloud Azure autoconfigured keyvault certificates sdk client
    • [ ] create one certificate to Key Vault Certificate using certificate client
    • [ ] get one certificate from Key Vault Certificate using certificate client

Connectivity of Spring Cloud Stream Binder Event Hubs

Connectivity of Spring Cloud Stream Binder Service Bus

Connectivity of servicebus-jms

Connectivity of spring-data-cosmos

[Optional] Connectivity of spring-kafka with eventhubs

[Optional] Connectivity of redis

This project will use service principal to connect

  1. use one pair of client-id and client secret to connect
  2. assign the roles to this service principal

[Optional] This project will also use managed identity to connect

  1. Provision an Azure Spring Apps service and enable the system assigned managed identity
  2. Deploy this project to the Azure Spring Apps service and connect using managed identity

This project will be run as a pipeline

  1. Schedule to run daily against Azure Global
  2. Manually run on PR against Azure Global
  3. weekly run against different Azure Clouds (Global, US, China)

This project will detect

Runtime dependency conflicts in:

Netyyyy commented 2 years ago

Optional tasks will work on