-
Notifications
You must be signed in to change notification settings - Fork 5
fix: cat type_metadata validaiton #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
daniel-butler-irl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add or update some of the test data for the mismatch types to ensure different widgets work https://github.com/terraform-ibm-modules/ibmcloud-terratest-wrapper/tree/main/cloudinfo/testdata
I am not sure if we should add new tests or enhance the existing mismatch type test
@daniel-butler-irl |
|
/run pipeline |
|
/run pipeline |
|
/run pipeline |
1 similar comment
|
/run pipeline |
|
Unit tests were failing, added new tests. So had to redo some stuff. |
|
/run pipeline |
|
/run pipeline |
|
/run pipeline |
| stackConfigPath: "testdata/stack_definition_with_type_metadata_only.json", | ||
| catalogJsonPath: "testdata/ibm_catalog_with_type_metadata_only.json", | ||
| expectedConfig: nil, | ||
| expectedError: fmt.Errorf("catalog configuration type_metadata mismatch in product 'Product Name', flavor 'Flavor Name': input5 expected type: string, got: int\n" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this read
"catalog configuration type_metadata mismatch in product 'Product Name', flavor 'Flavor Name': input5 expected type: int, got: string\n"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expectedType is string from stack definition and catalog catalogInput.TypeMetadata is int, so this should be correct!
stack def-
"inputs": [
{
"name": "input5",
"required": false,
"type_metadata": "string",
"hidden": false,
"default": "stack_value_5"
},
catalog val-
"configuration": [
{
"key": "input5",
"type_metadata": "int",
"description": "Description for input5",
"default_value": "default_value_5",
"required": false,
"display_name": "Input 5"
},
| catalogJsonPath: "testdata/ibm_catalog_with_type_metadata_only.json", | ||
| expectedConfig: nil, | ||
| expectedError: fmt.Errorf("catalog configuration type_metadata mismatch in product 'Product Name', flavor 'Flavor Name': input5 expected type: string, got: int\n" + | ||
| "catalog configuration type_metadata mismatch in product 'Product Name', flavor 'Flavor Name': input6 expected type: string, got: bool"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this
"catalog configuration type_metadata mismatch in product 'Product Name', flavor 'Flavor Name': input6 expected type: bool, got: string"),
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here also
stack def-
{
"name": "input6",
"required": false,
"type_metadata": "string",
"hidden": false,
"default": "stack_value_6"
},
catalog val-
{
"key": "input6",
"type_metadata": "bool",
"description": "Description for input6",
"default_value": "",
"required": false,
"display_name": "Input 6"
},
Description
Validation fix for type mismatch errors for catalog inputs.
Release required?
x.x.X)x.X.x)X.x.x)Release notes content
Run the pipeline
If the CI pipeline doesn't run when you create the PR, the PR requires a user with GitHub collaborators access to run the pipeline.
Run the CI pipeline when the PR is ready for review and you expect tests to pass. Add a comment to the PR with the following text:
Checklist for reviewers
For mergers