-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed lambda event json file parser and validation #3421
Conversation
@@ -48,16 +47,10 @@ object PartitionParser { | |||
mapper.readValue(inputStream, Partitions::class.java) | |||
} | |||
} | |||
object EndpointsJsonValidator : RemoteResolveParser { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be deleted? Would this object be required to validate the endpoints file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, adding back
EndpointsJsonValidatorTest::class.java.getResourceAsStream("/jsonSampleFailure.json").use { | ||
assertFalse(EndpointsJsonValidator.canBeParsed(it)) | ||
TestCase.assertFalse(EndpointsJsonValidator.canBeParsed(it)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could probably use Assertions.assertThat while asserting all test cases
import software.aws.toolkits.core.lambda.LambdaSampleEventJsonValidator | ||
class LambdaSampleEventJsonValidatorTest { | ||
@Test | ||
fun isJsonParse() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: rename test to Lambda sample event file can be parsed successfully
?
Kudos, SonarCloud Quality Gate passed!
|
Types of changes
Description
Fixed lambda event json file parser and validation
Motivation and Context
Related Issue(s)
#3359
Screenshots (if appropriate)
License
I confirm that my contribution is made under the terms of the Apache 2.0 license.