clintropolis commented on a change in pull request #10896:
URL: https://github.com/apache/druid/pull/10896#discussion_r580921964
##########
File path:
extensions-core/druid-basic-security/src/test/java/org/apache/druid/security/BasicAuthUtilsTest.java
##########
@@ -36,4 +51,112 @@ public void testHashPassword()
Assert.assertEquals(BasicAuthUtils.SALT_LENGTH, salt.length);
Assert.assertEquals(BasicAuthUtils.KEY_LENGTH / 8, hash.length);
}
+
+ @Test
+ public void testPermissionSerdeIsChillAboutUnknownEnumStuffs() throws
JsonProcessingException
Review comment:
I didn't end up splitting this one up yet, since I wasn't quite sure on
what way made the most sense after thinking about how it doesn't really take a
different code path from the `deserializeAuthorizerRoleMap` methods perspective
here, (the same exception is thrown and same code path taken regardless of
which enum failed to deserialize). I put both enums in here because it made me
feel better, but from a pure coverage perspective i don't think splitting at
least on different enum failures changes much.
Any suggestion on what split makes sense? There are more general tests that
cover happier paths with JSON serde of the types involved here in some of the
other test classes, I just did this unhappy path test in this test class so I
could call the `deserializeAuthorizerRoleMap` method directly without worrying
about the rest of the scaffolding stuff the happy path tests are using.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]