File tree 3 files changed +13
-1
lines changed
3 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
8
8
Versions follow [ Semantic Versioning] ( https://semver.org/> ) (<major >.<minor >.<patch >).
9
9
10
+ ## Changed
11
+
12
+ - Configuration is read from ` .pytest-iam.env `
13
+ - Configuration is read from enviroment vars prefixed by ` PYTEST_IAM_ `
14
+
10
15
## [ 0.0.11] - 2024-04-22
11
16
12
17
### Changed
Original file line number Diff line number Diff line change @@ -10,3 +10,8 @@ This returns a :const:`dict` containing the canaille :doc:`canaille:configuratio
10
10
def iam_configuration (iam_configuration ):
11
11
iam_configuration[" ACL" ][" DEFAULT" ][" WRITE" ].append(" groups" )
12
12
return iam_configuration
13
+
14
+ The configuration will also be read:
15
+
16
+ - from a `.pytest-iam.env ` file if existing;
17
+ - from any environment var with a valid Canaille setting name prefixed by `PYTEST_IAM_ `.
Original file line number Diff line number Diff line change @@ -184,7 +184,9 @@ def iam_server(iam_configuration) -> Server:
184
184
thread."""
185
185
186
186
port = portpicker .pick_unused_port ()
187
- app = create_app (config = iam_configuration )
187
+ app = create_app (
188
+ config = iam_configuration , env_file = ".pytest-iam.env" , env_prefix = "PYTEST_IAM_"
189
+ )
188
190
server = Server (app , port )
189
191
190
192
server_thread = threading .Thread (target = server .httpd .serve_forever )
You can’t perform that action at this time.
0 commit comments