"Deprecated Repository can be registered":
    - skip:
        features: warnings
    - do:
        warnings:
          - "[account] setting was deprecated in Elasticsearch and will be removed in a future release! See the breaking changes documentation for the next major version."
        snapshot.create_repository:
          repository: test_repo_azure
          verify: false
          body:
            type: azure
            settings:
              account   : "my_test_account"
              container : "backup-container"
              base_path :  "backups"
              chunk_size: "32m"
              compress  : true

    - is_true: acknowledged

    - do:
        snapshot.get_repository:
          repository: test_repo_azure

    - is_true : test_repo_azure
    - match   : { test_repo_azure.settings.account   : "my_test_account" }
    - match   : { test_repo_azure.settings.container : "backup-container" }
    - match   : { test_repo_azure.settings.base_path : "backups" }
    - match   : { test_repo_azure.settings.chunk_size: "32m" }
    - match   : { test_repo_azure.settings.compress  : "true" }
---
"Default repository can be registered":
    - do:
        snapshot.create_repository:
          repository: test_repo_azure
          verify: false
          body:
            type: azure
            settings:
              container : "backup-container"
              base_path :  "backups"
              chunk_size: "32m"
              compress  : true

    - is_true: acknowledged

    - do:
        snapshot.get_repository:
          repository: test_repo_azure

    - is_true : test_repo_azure
    - match   : { test_repo_azure.settings.container : "backup-container" }
    - match   : { test_repo_azure.settings.base_path : "backups" }
    - match   : { test_repo_azure.settings.chunk_size: "32m" }
    - match   : { test_repo_azure.settings.compress  : "true" }
---
"Named client repository can be registered":
    - do:
        snapshot.create_repository:
          repository: test_repo_azure
          verify: false
          body:
            type: azure
            settings:
              client    : "secondary"
              container : "backup-container"
              base_path :  "backups"
              chunk_size: "32m"
              compress  : true

    - is_true: acknowledged

    - do:
        snapshot.get_repository:
          repository: test_repo_azure

    - is_true : test_repo_azure
    - match   : { test_repo_azure.settings.client    : "secondary" }
    - match   : { test_repo_azure.settings.container : "backup-container" }
    - match   : { test_repo_azure.settings.base_path : "backups" }
    - match   : { test_repo_azure.settings.chunk_size: "32m" }
    - match   : { test_repo_azure.settings.compress  : "true" }
