Skip to content

CLID-602: Test for enclave scenario#25

Open
nidangavali wants to merge 1 commit into
oc-mirror-test:mainfrom
nidangavali:CLID-602
Open

CLID-602: Test for enclave scenario#25
nidangavali wants to merge 1 commit into
oc-mirror-test:mainfrom
nidangavali:CLID-602

Conversation

@nidangavali
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

@adolfo-ab adolfo-ab left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants