@@ -604,6 +604,17 @@ func TestApp(t *testing.T) {
604604threshold int
605605}
606606
607+ dummyURL := "https://google.com"
608+ dummyCommand := "read -p\\ \" Workspace spawned. Press enter to continue...\\ \" "
609+ dummyExternal := true
610+ dummySubdomain := true
611+ dummyHealthcheck := healthcheck {
612+ url :"https://google.com" ,
613+ interval :5 ,
614+ threshold :6 ,
615+ }
616+ dummyShare := "owner"
617+
607618cases := []struct {
608619name string
609620url string
@@ -616,52 +627,44 @@ func TestApp(t *testing.T) {
616627}{
617628{
618629name :"CommandAndSubdomain" ,
619- command :"read -p \\ \" Workspace spawned. Press enter to continue... \\ \" " ,
620- subdomain :true ,
630+ command :dummyCommand ,
631+ subdomain :dummySubdomain ,
621632expectError :regexp .MustCompile ("conflicts with subdomain" ),
622633},
623634{
624635name :"URLAndCommand" ,
625- url :"https://google.com" ,
626- command :"read -p \\ \" Workspace spawned. Press enter to continue... \\ \" " ,
636+ url :dummyURL ,
637+ command :dummyCommand ,
627638expectError :regexp .MustCompile ("conflicts with command" ),
628639},
629640{
630- name :"HealthcheckAndCommand" ,
631- healthcheck :healthcheck {
632- url :"https://google.com" ,
633- interval :5 ,
634- threshold :6 ,
635- },
636- command :"read -p\\ \" Workspace spawned. Press enter to continue...\\ \" " ,
641+ name :"HealthcheckAndCommand" ,
642+ healthcheck :dummyHealthcheck ,
643+ command :dummyCommand ,
637644expectError :regexp .MustCompile ("conflicts with command" ),
638645},
639646{
640- name :"ExternalAndHealthcheck" ,
641- external :true ,
642- healthcheck :healthcheck {
643- url :"https://google.com" ,
644- interval :5 ,
645- threshold :6 ,
646- },
647+ name :"ExternalAndHealthcheck" ,
648+ external :dummyExternal ,
649+ healthcheck :dummyHealthcheck ,
647650expectError :regexp .MustCompile ("conflicts with healthcheck" ),
648651},
649652{
650653name :"ExternalAndCommand" ,
651- external :true ,
652- command :"read -p \\ \" Workspace spawned. Press enter to continue... \\ \" " ,
654+ external :dummyExternal ,
655+ command :dummyCommand ,
653656expectError :regexp .MustCompile ("conflicts with command" ),
654657},
655658{
656659name :"ExternalAndSubdomain" ,
657- external :true ,
658- subdomain :true ,
660+ external :dummyExternal ,
661+ subdomain :dummySubdomain ,
659662expectError :regexp .MustCompile ("conflicts with subdomain" ),
660663},
661664{
662665name :"ExternalAndShare" ,
663- external :true ,
664- share :"https://google.com" ,
666+ external :dummyExternal ,
667+ share :dummyShare ,
665668expectError :regexp .MustCompile ("conflicts with share" ),
666669},
667670}