Move2Kube is a command-line tool for automating creation of Infrastructure as code (IaC) artifacts. It has inbuilt support for creating IaC artifacts for replatforming to Kubernetes/Openshift.
t.Run("check if all clusters in constant were loaded", func(t *testing.T) {
p := plantypes.NewPlan()
loader := metadata.ClusterMDLoader{}
cmMap := loader.GetClusters(p)
//TODO: Read all .yaml files in internal/metadata/clusters, and find the value in metadata.name using say a regex
for clustername := range <ALL NAMES IDENTIFIED IN ABOVE STEP> {
if _, ok := cmMap[clustername]; !ok {
t.Fatal("Missing builtin "+clustername+" cluster metadata. The returned cluster info:", cmMap)
}
}
})
Description
Write unit tests to check the generated files are valid.
Add the below test just before https://github.com/konveyor/move2kube/blob/8c23e21d0f57928d6af63d5f06015a5981aea5e6/internal/metadata/clustermdloader_test.go#L52