Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class DellPowerstoreConfig(StorageBackendConfig):
san_ip: Annotated[
str,
Field(description="Dell PowerStore management IP"),
SecretDictField(field="san-ip"),
]
san_login: Annotated[
str,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,15 @@ def test_dellpowerstore_san_credentials_are_secret(self, backend):

config_class = backend.config_type()

# Check san_ip is marked as secret
ip_field = config_class.model_fields.get("san_ip")
assert ip_field is not None
has_secret_marker = any(
isinstance(m, SecretDictField) for m in ip_field.metadata
)

assert has_secret_marker, "san_ip` should be marked as secret"

# Check san_login is marked as secret
username_field = config_class.model_fields.get("san_login")
assert username_field is not None
Expand Down
Loading