Skip to content

Commit 518dead

Browse files
committed
fix(kubernetes): satisfy ownership test lint
Signed-off-by: Drew Newberry <385+drew@users.noreply.github.com>
1 parent b336f8b commit 518dead

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • crates/openshell-driver-kubernetes/src

crates/openshell-driver-kubernetes/src/driver.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5292,13 +5292,14 @@ mod tests {
52925292
validate_sandbox_owner_identity(&owner, "sandbox-id-a", &sandbox)
52935293
.expect("matching owner identity");
52945294

5295-
let wrong_uid = sandbox_object_for_test("sandbox-uid-b", "sandbox-id-a");
5295+
let mismatched_owner = sandbox_object_for_test("sandbox-uid-b", "sandbox-id-a");
52965296
let error =
5297-
validate_sandbox_owner_identity(&owner, "sandbox-id-a", &wrong_uid).unwrap_err();
5297+
validate_sandbox_owner_identity(&owner, "sandbox-id-a", &mismatched_owner).unwrap_err();
52985298
assert_eq!(error.code(), tonic::Code::PermissionDenied);
52995299

5300-
let wrong_id = sandbox_object_for_test("sandbox-uid-a", "sandbox-id-b");
5301-
let error = validate_sandbox_owner_identity(&owner, "sandbox-id-a", &wrong_id).unwrap_err();
5300+
let mismatched_annotation = sandbox_object_for_test("sandbox-uid-a", "sandbox-id-b");
5301+
let error = validate_sandbox_owner_identity(&owner, "sandbox-id-a", &mismatched_annotation)
5302+
.unwrap_err();
53025303
assert_eq!(error.code(), tonic::Code::PermissionDenied);
53035304
}
53045305

0 commit comments

Comments
 (0)