jenkinsci / configuration-as-code-plugin

Jenkins Configuration as Code Plugin
https://plugins.jenkins.io/configuration-as-code
MIT License
2.69k stars 718 forks source link

Add json schema validation to RoundTripAbstractTest #1094

Open timja opened 5 years ago

timja commented 5 years ago

https://github.com/jenkinsci/configuration-as-code-plugin/blob/1009f950babffb896a67f9ebae3d07cfcf537f5f/plugin/src/test/java/io/jenkins/plugins/casc/misc/RoundTripAbstractTest.java#L47

RoundTripAbstractTest should be updated to validate the json schema as well

oleg-nenashev commented 5 years ago

FYI @MRamonLeon

sladyn98 commented 5 years ago

@timja Would adding one of the schema.validate("filename") functions be sufficient here? In the sense validation before application ?

timja commented 5 years ago

@timja Would adding one of the schema.validate("filename") functions be sufficient here? In the sense validation before application ?

not quite sure, but basically what you've done in your testing PR but adding a call to this in the uber abstract test

sladyn98 commented 5 years ago

So basically call the function from this test ?