@@ -596,66 +596,4 @@ func TestApp(t *testing.T) {
596596 })
597597 }
598598 })
599-
600- // TODO: Find a better place for this?
601- // TODO: Do we need to test this with the schema rules already existing?
602- t .Run ("Command" , func (t * testing.T ) {
603- t .Parallel ()
604-
605- cases := []struct {
606- name string
607- command string
608- subdomain bool
609- expectError * regexp.Regexp
610- }{
611- {
612- name : "Command" ,
613- command : "read -p \\ \" Workspace spawned. Press enter to continue...\\ \" " ,
614- },
615- {
616- name : "CommandAndURL" ,
617- command : "read -p \\ \" Workspace spawned. Press enter to continue...\\ \" " ,
618- subdomain : true ,
619- expectError : regexp .MustCompile ("conflicts with subdomain" ),
620- },
621- }
622-
623- for _ , c := range cases {
624- c := c
625-
626- t .Run (c .name , func (t * testing.T ) {
627- t .Parallel ()
628-
629- subdomainLine := ""
630- if c .subdomain {
631- subdomainLine = "subdomain = true"
632- }
633-
634- config := fmt .Sprintf (`
635- provider "coder" {}
636- resource "coder_agent" "dev" {
637- os = "linux"
638- arch = "amd64"
639- }
640- resource "coder_app" "code-server" {
641- agent_id = coder_agent.dev.id
642- slug = "code-server"
643- display_name = "Testing"
644- open_in = "slim-window"
645- command = "%s"
646- %s
647- }
648- ` , c .command , subdomainLine )
649-
650- resource .Test (t , resource.TestCase {
651- ProviderFactories : coderFactory (),
652- IsUnitTest : true ,
653- Steps : []resource.TestStep {{
654- Config : config ,
655- ExpectError : c .expectError ,
656- }},
657- })
658- })
659- }
660- })
661599}
0 commit comments