-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1e5b3d2
commit ad2459e
Showing
6 changed files
with
137 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
46 changes: 0 additions & 46 deletions
46
hack/generator/pkg/codegen/testdata/ARMCodeGeneratorPipeline.golden
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
hack/generator/pkg/codegen/testdata/TestCodeGeneratorPipeline.golden
This file was deleted.
Oops, something went wrong.
41 changes: 41 additions & 0 deletions
41
...nerator/pkg/codegen/testdata/TestNewARMCodeGeneratorFromConfigCreatesRightPipeline.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
Expected Pipeline Stages for ARM Code Generation | ||
------------------------------------------------ | ||
loadSchema Load and walk schema | ||
addStatusFromSwagger Add information from Swagger specs for 'status' fields | ||
allof-anyof-objects Convert allOf and oneOf to object types | ||
flattenResources Flatten nested resource types | ||
augmentSpecWithStatus Merges information from Status into Spec | ||
stripUnreferenced Strip unreferenced types | ||
nameTypes Name inner types for CRD | ||
propertyRewrites Modify property types using configured transforms | ||
determineResourceOwnership Determine ARM resource relationships | ||
removeAliases Remove type aliases | ||
collapseCrossGroupReferences Finds and removes cross group references | ||
pluralizeNames Improve resource pluralization | ||
stripUnreferenced Strip unreferenced types | ||
assertTypesStructureValid Verify that all local TypeNames refer to a type | ||
removeEmbeddedResources azure Remove properties that point to embedded resources. Only removes structural aspects of embedded resources, Id/ARMId references are retained. | ||
filterTypes Apply export filters to reduce the number of generated types | ||
stripUnreferenced Strip unreferenced types | ||
replaceAnyTypeWithJSON Replace properties using interface{} with arbitrary JSON | ||
addCrossResourceReferences azure Replace cross-resource references with genruntime.ResourceReference | ||
reportTypesAndVersions azure Generate reports on types and versions in each package | ||
createArmTypes azure Create types for interaction with ARM | ||
applyArmConversionInterface azure Add ARM conversion interfaces to Kubernetes types | ||
applyKubernetesResourceInterface azure Add the KubernetesResource interface to every resource | ||
flattenProperties Apply flattening to properties marked for flattening | ||
stripUnreferenced Strip unreferenced types | ||
createConversionGraph azure Create the graph of conversions between versions of each resource group | ||
injectOriginalVersionFunction azure Inject the function OriginalVersion() into each Spec type | ||
createStorageTypes azure Create storage versions of CRD types | ||
injectOriginalVersionProperty azure Inject the property OriginalVersion into each Storage Spec type | ||
injectPropertyAssignmentFunctions azure Inject property assignment functions AssignFrom() and AssignTo() into resources and objects | ||
injectOriginalGVKFunction azure Inject the function OriginalGVK() into each Resource type | ||
simplifyDefinitions Flatten definitions by removing wrapper types | ||
jsonTestCases azure Add test cases to verify JSON serialization | ||
markStorageVersion Mark the latest version of each resource as the storage version | ||
rogueCheck Check for rogue definitions using AnyTypes | ||
ensureArmTypeExistsForEveryType azure Check that an ARM type exists for both Spec and Status of each resource | ||
deleteGenerated Delete generated code from . | ||
exportPackages Export packages to "." | ||
exportControllerResourceRegistrations azure Export resource registrations to "" |
31 changes: 31 additions & 0 deletions
31
.../pkg/codegen/testdata/TestNewCrossplaneCodeGeneratorFromConfigCreatesRightPipeline.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Expected Pipeline Stages for ARM Code Generation | ||
------------------------------------------------ | ||
loadSchema Load and walk schema | ||
addStatusFromSwagger Add information from Swagger specs for 'status' fields | ||
allof-anyof-objects Convert allOf and oneOf to object types | ||
flattenResources Flatten nested resource types | ||
augmentSpecWithStatus Merges information from Status into Spec | ||
stripUnreferenced Strip unreferenced types | ||
nameTypes Name inner types for CRD | ||
propertyRewrites Modify property types using configured transforms | ||
determineResourceOwnership Determine ARM resource relationships | ||
removeAliases Remove type aliases | ||
collapseCrossGroupReferences Finds and removes cross group references | ||
pluralizeNames Improve resource pluralization | ||
stripUnreferenced Strip unreferenced types | ||
assertTypesStructureValid Verify that all local TypeNames refer to a type | ||
filterTypes Apply export filters to reduce the number of generated types | ||
stripUnreferenced Strip unreferenced types | ||
replaceAnyTypeWithJSON Replace properties using interface{} with arbitrary JSON | ||
flattenProperties Apply flattening to properties marked for flattening | ||
stripUnreferenced Strip unreferenced types | ||
addCrossplaneOwnerProperties crossplane Add the 3-tuple of (xName, xNameRef, xNameSelector) for each owning resource | ||
addCrossplaneForProviderProperty crossplane Add a 'ForProvider' property on every spec | ||
addCrossplaneAtProviderProperty crossplane Add an 'AtProvider' property on every status | ||
addCrossplaneEmbeddedResourceSpec crossplane Add an embedded runtimev1alpha1.ResourceSpec to every spec type | ||
addCrossplaneEmbeddedResourceStatus crossplane Add an embedded runtimev1alpha1.ResourceStatus to every status type | ||
simplifyDefinitions Flatten definitions by removing wrapper types | ||
markStorageVersion Mark the latest version of each resource as the storage version | ||
rogueCheck Check for rogue definitions using AnyTypes | ||
deleteGenerated Delete generated code from . | ||
exportPackages Export packages to "." |
29 changes: 29 additions & 0 deletions
29
hack/generator/pkg/codegen/testdata/TestNewTestCodeGeneratorCreatesRightPipeline.golden
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Expected Pipeline Stages for Test Code Generation | ||
------------------------------------------------- | ||
loadTestSchema Load and walk schema (test) | ||
addStatusFromSwagger Add information from Swagger specs for 'status' fields | ||
allof-anyof-objects Convert allOf and oneOf to object types | ||
flattenResources Flatten nested resource types | ||
augmentSpecWithStatus Merges information from Status into Spec | ||
stripUnused Strip unused types for test | ||
nameTypes Name inner types for CRD | ||
propertyRewrites Modify property types using configured transforms | ||
determineResourceOwnership Determine ARM resource relationships | ||
removeAliases Remove type aliases | ||
pluralizeNames Improve resource pluralization | ||
stripUnused Strip unused types for test | ||
assertTypesStructureValid Verify that all local TypeNames refer to a type | ||
filterTypes Apply export filters to reduce the number of generated types | ||
stripUnused Strip unused types for test | ||
replaceAnyTypeWithJSON Replace properties using interface{} with arbitrary JSON | ||
addCrossResourceReferences azure Replace cross-resource references with genruntime.ResourceReference | ||
applyKubernetesResourceInterface azure Add the KubernetesResource interface to every resource | ||
flattenProperties Apply flattening to properties marked for flattening | ||
stripUnused Strip unused types for test | ||
createConversionGraph azure Create the graph of conversions between versions of each resource group | ||
simplifyDefinitions Flatten definitions by removing wrapper types | ||
jsonTestCases azure Add test cases to verify JSON serialization | ||
markStorageVersion Mark the latest version of each resource as the storage version | ||
ensureArmTypeExistsForEveryType azure Check that an ARM type exists for both Spec and Status of each resource | ||
exportTestPackages Export packages for test | ||
exportControllerResourceRegistrations azure Export resource registrations to "" |