Skip to content
Snippets Groups Projects

azure: Add tests based on Azurite in addition to mocks

1 unresolved thread

In addition to add support for multi-hashes (#2309), we will need to use more advanced features of the Azure Blob Storage, so using only mock-based tests will be less reliable.

This commit adds the option to run the test suite with Azurite, a clone of the Azure Blob Storage API, which is a standard tool used in tests.

See https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite

Test Plan

npm install azurite
AZURITE_PATH=$HOME/node_modules/.bin/ pytest -m azurite

Migrated from D8756 (view on Phabricator)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
131 "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq"
132 "/K1SZFPTOtr/KBHBeksoGMGw=="
133 )
134
135 container_url = f"{base_url}/{account_name}"
136 cls._connection_string = (
137 f"DefaultEndpointsProtocol=https;"
138 f"AccountName={account_name};"
139 f"AccountKey={account_key};"
140 f"BlobEndpoint={container_url};"
141 )
142
143 @classmethod
144 def tearDownClass(cls):
145 super().tearDownClass()
146 cls._azurite_proc.kill()
  • As this includes the container_name, is the separate argument needed for get_objstorage?

    If azurite supports that, it may be nicer to get a shared access signature and pass it through to the existing connection_url argument (which would introduce coverage of the code that retrieves shared access signatures as well).

  • s/connection_url/container_url/, of course

  • Author Maintainer

    It's needed by ContainerClient.from_connection_string for some reason

  • Please register or sign in to reply
  • Author Maintainer

    Use 'azurite-blob' instead of 'azurite'/'azurite.js'

  • Build is green

    Patch application report for D8756 (id=31606)

    Rebasing onto 3718273e...

    Current branch diff-target is up to date.
    Changes applied before test
    commit ea6687830098a73f88d0d20e671dd5b01e3a17ac
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Mon Oct 24 14:44:03 2022 +0200
    
        azure: Add tests based on Azurite in addition to mocks
        
        In addition to add support for multi-hashes, we will need to use more advanced
        features of the Azure Blob Storage, so using only mock-based tests will be
        less reliable.
        
        This commit adds the option to run the test suite with Azurite, a clone
        of the Azure Blob Storage API, which is a standard tool used in tests.

    See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/179/ for more details.

  • Author Maintainer

    Begone, markers

  • Build has FAILED

    Patch application report for D8756 (id=31607)

    Rebasing onto 3718273e...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 51edf12a8c83744bd316cfb30891d6df70b150d8
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Mon Oct 24 14:44:03 2022 +0200
    
        azure: Add tests based on Azurite in addition to mocks
        
        In addition to add support for multi-hashes, we will need to use more advanced
        features of the Azure Blob Storage, so using only mock-based tests will be
        less reliable.
        
        This commit adds the option to run the test suite with Azurite, a clone
        of the Azure Blob Storage API, which is a standard tool used in tests.

    Link to build: https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/180/ See console output for more information: https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/180/console

  • Build is green

    Patch application report for D8756 (id=31607)

    Rebasing onto 3718273e...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 51edf12a8c83744bd316cfb30891d6df70b150d8
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Mon Oct 24 14:44:03 2022 +0200
    
        azure: Add tests based on Azurite in addition to mocks
        
        In addition to add support for multi-hashes, we will need to use more advanced
        features of the Azure Blob Storage, so using only mock-based tests will be
        less reliable.
        
        This commit adds the option to run the test suite with Azurite, a clone
        of the Azure Blob Storage API, which is a standard tool used in tests.

    See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/181/ for more details.

  • Build is green

    Patch application report for D8756 (id=31607)

    Rebasing onto 3718273e...

    Current branch diff-target is up to date.
    Changes applied before test
    commit 51edf12a8c83744bd316cfb30891d6df70b150d8
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Mon Oct 24 14:44:03 2022 +0200
    
        azure: Add tests based on Azurite in addition to mocks
        
        In addition to add support for multi-hashes, we will need to use more advanced
        features of the Azure Blob Storage, so using only mock-based tests will be
        less reliable.
        
        This commit adds the option to run the test suite with Azurite, a clone
        of the Azure Blob Storage API, which is a standard tool used in tests.

    See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/182/ for more details.

  • Author Maintainer

    remove leftover marker

  • Build is green

    Patch application report for D8756 (id=31612)

    Rebasing onto 3718273e...

    Current branch diff-target is up to date.
    Changes applied before test
    commit df4be2d87c300940e8a118371acc8796e8b7e715
    Author: Valentin Lorentz <vlorentz@softwareheritage.org>
    Date:   Mon Oct 24 14:44:03 2022 +0200
    
        azure: Add tests based on Azurite in addition to mocks
        
        In addition to add support for multi-hashes, we will need to use more advanced
        features of the Azure Blob Storage, so using only mock-based tests will be
        less reliable.
        
        This commit adds the option to run the test suite with Azurite, a clone
        of the Azure Blob Storage API, which is a standard tool used in tests.

    See https://jenkins.softwareheritage.org/job/DOBJS/job/tests-on-diff/183/ for more details.

  • closed

  • Author Maintainer

    Merge request was merged

  • Please register or sign in to reply
    Loading