CLID-602: Test for enclave scenario#25
Conversation
adolfo-ab
left a comment
There was a problem hiding this comment.
Please address changes and re-submit the PR in the oc-mirror repo
| // createAdditionalRegistryConfig creates a distribution/distribution registry configuration file | ||
| // with the specified storage root directory and port. Use this to create additional registries | ||
| // beyond the default testRegistry (port 5000). Each additional registry needs a unique port and storage path. | ||
| func createAdditionalRegistryConfig(path string, storageRoot string, port int) { |
There was a problem hiding this comment.
Better to have the config in a yaml file, instead of hardcoded in the function, same as the original registry config yaml, it's cleaner.
There was a problem hiding this comment.
This config requires dynamic values mainly rootdirectory and port, so a static YAML file would still need templating. The inline fmt.Sprintf keeps it simple.
| }) | ||
| }) | ||
|
|
||
| func writeISC(path, content string) { |
There was a problem hiding this comment.
This function doesn't make sense. It's called writeISC but that name is misleading, since I can literally pass any string even if it has nothing to do with an ISC, and it will write the file. Do we even need to create this ISC dynamically in the first place? Or can we add a yaml file to the testdata? In the case that we do need to create it dynamically then we need to do a better job, e.g. something similar to what is done in oc-mirror itself to create ISCs.
There was a problem hiding this comment.
Agreed on the naming,I'll inline the os.WriteFile and drop the wrapper. The ISC itself has to be created dynamically though, since the catalog reference depends on the runtime registry endpoint.I'll check what's done in oc-mirror and do changes if possible.
No description provided.