test: Add integration tests for downscoping (#837)
This tests creates a temporary bucket and 2 objects in it.
A downscoped token is then created to access only one of the objects (readonly).
The test would then check:
- Read access to accessible object is successful.
- Write access to that object is unsuccessful.
- Read access to the inaccessible object is not successful.
diff --git a/system_tests/noxfile.py b/system_tests/noxfile.py
index 33e49c3..540727e 100644
--- a/system_tests/noxfile.py
+++ b/system_tests/noxfile.py
@@ -350,6 +350,20 @@
)
+@nox.session(python=PYTHON_VERSIONS_SYNC)
+def downscoping(session):
+ session.install(
+ *TEST_DEPENDENCIES_SYNC,
+ "google-auth",
+ "google-cloud-storage",
+ )
+ default(
+ session,
+ "system_tests_sync/test_downscoping.py",
+ *session.posargs,
+ )
+
+
# ASYNC SYSTEM TESTS
@nox.session(python=PYTHON_VERSIONS_ASYNC)