ocitools
ocitools copied to clipboard
Convert test_runtime.sh into a go program
The similar go implementation is here: https://github.com/huawei-openlab/oct/blob/master/validate.go But that is designed for testing multiple cases. I'd like to prepare a single-case one based on your test_runtime.sh and the change in #7 .
I have a question, where should we put the new program to? It is higher level of the current ocitools.
@liangchenye We can have a program here that takes a path to a rootfs and a test case to start with.
The go program is here: https://github.com/liangchenye/ocitools/blob/master/testRuntime.go which is made from oct/validate.go. The command line is not supported yet. Should it became a part of main.go?
@liangchenye Nice! I think it should be a part of main.go. There is a validate which I intended for spec validation. Maybe --runtime or a separate command for runtime validation.
@mrunalp new PR submitted. That is used to verify if a bundle was valid. The code was modified from bundleValidator in OCT. I think it is the 'spec validation' right?
Once the hashing and the archival format are defined in OCI, the relevant codes will also be added to bundle.go.