@@ -558,6 +558,48 @@ consumes:
558558 Expect (err .Error ()).To (ContainSubstring ("tile metadata_version too old" ))
559559 })
560560 })
561+
562+ When ("the tile does not set parallel deploys or product version requirements" , func () {
563+ BeforeEach (func () {
564+ m := models.Metadata {
565+ Name : "k8s-tile-test" ,
566+ Label : "test tile" ,
567+ IconImage : "$( icon )" ,
568+ MetadataVersion : "3.2.0" ,
569+ MinimumVersionForUpgrade : "0.0.0" ,
570+ ProductVersion : "$( version )" ,
571+ Rank : 1 ,
572+ Serial : false ,
573+ PropertyBlueprints : []string {
574+ `$( property "database_name" )` ,
575+ `$( property "admin_password" )` ,
576+ },
577+ FormTypes : []string {`$( form "db_props" )` },
578+ Variables : []proofing.Variable {},
579+ PackageInstalls : []string {`$( package "test-install" )` },
580+ }
581+ yamlData , err := yaml .Marshal (& m )
582+ Expect (err ).NotTo (HaveOccurred ())
583+ err = os .WriteFile (path .Join (inputPath , "base.yml" ), yamlData , 0644 ) // 0644 sets file permissions
584+ Expect (err ).NotTo (HaveOccurred ())
585+ })
586+
587+ It ("omits both fields from the generated base.yml" , func () {
588+ Expect (err ).NotTo (HaveOccurred ())
589+
590+ yamlPath := path .Join (outputPath , "base.yml" )
591+ rawYaml , err := os .ReadFile (yamlPath )
592+ Expect (err ).NotTo (HaveOccurred ())
593+ Expect (string (rawYaml )).NotTo (ContainSubstring ("supports_parallel_deploys" ))
594+ Expect (string (rawYaml )).NotTo (ContainSubstring ("requires_product_versions" ))
595+
596+ outMeta := models.MetadataOut {}
597+ err = yaml .Unmarshal (rawYaml , & outMeta )
598+ Expect (err ).NotTo (HaveOccurred ())
599+ Expect (outMeta .SupportsParallelDeploys ).To (BeFalse ())
600+ Expect (outMeta .RequiresProductVersions ).To (BeEmpty ())
601+ })
602+ })
561603 })
562604 })
563605
0 commit comments