-
Notifications
You must be signed in to change notification settings - Fork 923
Add integration tests for Azure Storage driver #1572
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
5647484 to
5544da1
Compare
5544da1 to
13721ca
Compare
13721ca to
e24f58e
Compare
Codecov Report
@@ Coverage Diff @@
## trunk #1572 +/- ##
=======================================
Coverage 83.00% 83.00%
=======================================
Files 394 394
Lines 84990 84990
Branches 9038 9038
=======================================
Hits 70550 70550
Misses 11373 11373
Partials 3067 3067 Continue to review full report at Codecov.
|
2af6945 to
1e569d3
Compare
1e569d3 to
c6d108a
Compare
| self.driver = driver_class(**kwargs) | ||
|
|
||
| def tearDown(self): | ||
| for container in self.driver.list_containers(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we wrap this with try / except and still proceed if there is an error (but I guess we should at least log an error if there is an exception and instruct user to manually delete those containers or similar).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in d9f577e.
|
Thanks for working on this.
@tonybaloney Do you happen to know if Azure has some kind of free credits for OSS program, similar to the AWS one which we could use for running end to end tests? |
|
@Kami @tonybaloney Given that ASF is a non-profit, the Azure for non-profits grant could be an avenue to get some credits. |
0c4d093 to
d9f577e
Compare
|
I've put in an internal request at Microsoft for some credit.
I'll ping back on here when/if it gets approved
…On Wed, Mar 24, 2021 at 1:18 AM Clemens Wolff ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In integration/storage/base.py
<#1572 (comment)>:
> + value = getattr(self, required, None)
+ if value is None:
+ raise unittest.SkipTest('config {} not set'.format(required))
+
+ kwargs = {'key': self.account, 'secret': self.secret}
+
+ for optional in 'host', 'port', 'secure':
+ value = getattr(self, optional, None)
+ if value is not None:
+ kwargs[optional] = value
+
+ driver_class = providers.get_driver(self.provider)
+ self.driver = driver_class(**kwargs)
+
+ def tearDown(self):
+ for container in self.driver.list_containers():
Done in 0c4d093
<0c4d093>
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1572 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALWEAJV7Q7DO3ZMT5IMGXTTFCPKHANCNFSM4ZQSB2FA>
.
|
|
@tonybaloney @Kami Any thoughts on next steps for this integration test PR? |
| [testenv:integration-storage] | ||
| deps = -r{toxinidir}/integration/storage/requirements.txt | ||
|
|
||
| commands = python -m integration.storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, although in the future I would prefer to use pytest directly - this way common pytest flags (e.g. -s) and plugins can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: Sorry, I just see you followed an existing pattern since original compute integration tests code is quite old :)
Kami
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for working on this 👍
(I'll push a small change in the near future to utilize pytest instead of standard unit test test loader for consistency with other test jobs and so we utilize various pytest plugins such as test timing info, etc.)
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## trunk #1572 +/- ##
=======================================
Coverage 83.01% 83.01%
=======================================
Files 394 394
Lines 84990 84990
Branches 9038 9038
=======================================
Hits 70550 70550
Misses 11373 11373
Partials 3067 3067 🚀 New features to boost your workflow:
|
* Fix build * Namespace compute integration tests * Add integration tests for Azure Storage driver
* Fix build * Namespace compute integration tests * Add integration tests for Azure Storage driver
Add integration tests for Azure Storage driver
Description
As discussed in #1553 (comment), this pull request ports the Azure Storage driver integration tests from libcloud-tests to trunk.
The tests are split into a generic storage integration test base (which uses the high level storage driver API to run various scenarios) and specific instantiations which exercise various Azure Storage backends. The intent is that the test base in the future can be re-used to quickly add integration tests for other storage backends.
Notes:
apt-get updateto fix the CI, similar to what's described in Unable to connect to azure.archive.ubuntu.com flaky failure on ubuntu-latest actions/runner-images#675.While libcloud-tests ran against containerized and cloud-based storage accounts, for now this pull request only ports the former as I will soon loose access to my free cloud credits. However, if someone wants to add me to an Azure subscription that is funded for this project, or provide me with the credentials for a service principal, I'm more than happy to add the required code to run the test suite against the live cloud storage backends.Status
Checklist