Repository navigation
Conversation
Update Go toolchain and runtime requirement to 1.26.10 addressing intermediate CA validation compromise (go.dev/issue/82345).
# Conflicts: # go.mod # go.sum
Stackitcre 382 registry fixes
| isValid: false, | ||
| }, | ||
| } | ||
|
|
There was a problem hiding this comment.
You can add here more test cases like empty or invalid artifactoryId, no flagValues no argValues etc. You can see the delete tests from other services as example.
| isValid: false, | ||
| }, | ||
| } | ||
|
|
There was a problem hiding this comment.
As I mentioned in the delete_test, here you can also extend the tests with more test cases.
| isValid: false, | ||
| }, | ||
| } | ||
|
|
There was a problem hiding this comment.
as mentioned in the tests of delete and describe commands, here we can also add more test cases. At least invalid artifactory id checks
| model.KMSCustomEndpoint = false | ||
| }), | ||
| }, | ||
| { |
There was a problem hiding this comment.
please add a test in here for the empty endpoint case
| ), | ||
| examples.NewExample( | ||
| `Create a proxy-cache artifactory with credentials`, | ||
| "$ stackit registry artifactory create --name my-proxy --proxy-url https://custom-registry.com --proxy-registry-type harbor --proxy-access-key my-user --proxy-access-secret my-secret", |
There was a problem hiding this comment.
Setting the flag with a secret value has been deprecated. Secrets will be read from the given file or can be prompted. The following implementation is correct, but example needs to be updated.
Please take a look at the example
| proxyRegistryType := flags.FlagToStringPointer(p, cmd, proxyRegistryTypeFlag) | ||
| proxyDesc := flags.FlagToStringPointer(p, cmd, proxyDescriptionFlag) | ||
| proxyKey := flags.FlagToStringPointer(p, cmd, proxyAccessKeyFlag) | ||
| proxySecret := flags.SecretFlagToStringPointer(p, cmd, proxyAccessSecretFlag) |
There was a problem hiding this comment.
First example, where only name is given does not work, user always gets a prompt to set a secret. We had detected and fixed this optional secret flag issue in STACKIT CLI, see 1697
We have a new function ResolveSecretFlag, which will let you define optional secret flags. e.g
…to feat/STACKITCRE-382-registry-fix-comments
…ITCRE-382 - Migrate optional secret flag resolution to flags.ResolveSecretFlag in create and update commands to prevent unintended stdin prompts when omitted - Update command examples in create.go to read secrets from stdin (-) or file (@<file>) instead of deprecated literal strings - Regenerate registry create and update documentation - Expand unit test coverage in delete_test.go, describe_test.go, and update_test.go for missing args, missing flags, and empty/invalid artifactory UUIDs - Add secret resolution test cases using fstest.MapFS and verify rejection of literal secret values - Add missing unit test case for unsetting registry-custom-endpoint in unset_test.go Relates to STACKITCRE-382
- Add 'stackit registry replication-adapter list' command to list available replication adapters - Support client-side --limit flag and JSON/YAML table formatting - Add unit tests covering argument parsing, request building, and output formatting - Generate markdown documentation for the new command Relates to STACKITCRE-382
- Add TestFetchArtifactories unit tests covering pagination, limit, and error handling - Add test cases for proxy access secret without key and empty flags in create - Add test case for proxy without description in describe output - Add test case for nil model in create and update outputResult - Add JSON output format test case in replication-adapter list Relates to STACKITCRE-382
…-comments Feat/stackitcre 382 registry fix comments
Description
https://jira.schwarz/browse/STACKITCRE-382
Relates to STACKITCRE-382
Checklist
make fmtmake generate-docs(will be checked by CI)make test(will be checked by CI)make lint(will be checked by CI)