Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0750f37

Browse files
committed
fix: convert to using dummy values
1 parent63c5cdc commit0750f37

File tree

1 file changed

+27
-24
lines changed

1 file changed

+27
-24
lines changed

‎provider/app_test.go‎

Lines changed: 27 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -604,6 +604,17 @@ func TestApp(t *testing.T) {
604604
thresholdint
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+
607618
cases:= []struct {
608619
namestring
609620
urlstring
@@ -616,52 +627,44 @@ func TestApp(t *testing.T) {
616627
}{
617628
{
618629
name:"CommandAndSubdomain",
619-
command:"read -p\\\"Workspace spawned. Press enter to continue...\\\"",
620-
subdomain:true,
630+
command:dummyCommand,
631+
subdomain:dummySubdomain,
621632
expectError:regexp.MustCompile("conflicts with subdomain"),
622633
},
623634
{
624635
name:"URLAndCommand",
625-
url:"https://google.com",
626-
command:"read -p\\\"Workspace spawned. Press enter to continue...\\\"",
636+
url:dummyURL,
637+
command:dummyCommand,
627638
expectError: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,
637644
expectError: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,
647650
expectError:regexp.MustCompile("conflicts with healthcheck"),
648651
},
649652
{
650653
name:"ExternalAndCommand",
651-
external:true,
652-
command:"read -p\\\"Workspace spawned. Press enter to continue...\\\"",
654+
external:dummyExternal,
655+
command:dummyCommand,
653656
expectError:regexp.MustCompile("conflicts with command"),
654657
},
655658
{
656659
name:"ExternalAndSubdomain",
657-
external:true,
658-
subdomain:true,
660+
external:dummyExternal,
661+
subdomain:dummySubdomain,
659662
expectError:regexp.MustCompile("conflicts with subdomain"),
660663
},
661664
{
662665
name:"ExternalAndShare",
663-
external:true,
664-
share:"https://google.com",
666+
external:dummyExternal,
667+
share:dummyShare,
665668
expectError:regexp.MustCompile("conflicts with share"),
666669
},
667670
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp