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