@@ -602,13 +602,9 @@ func TestUpdateValidateRichParameters(t *testing.T) {
602
602
// Update the workspace
603
603
inv , root = clitest .New (t , "update" , "my-workspace" )
604
604
clitest .SetupConfig (t , client , root )
605
- doneChan := make ( chan struct {})
605
+
606
606
pty := ptytest .New (t ).Attach (inv )
607
- go func () {
608
- defer close (doneChan )
609
- err := inv .Run ()
610
- assert .NoError (t , err )
611
- }()
607
+ clitest .Start (t , inv )
612
608
613
609
matches := []string {
614
610
stringParameterName , "second_option" ,
@@ -623,7 +619,6 @@ func TestUpdateValidateRichParameters(t *testing.T) {
623
619
pty .WriteLine (value )
624
620
}
625
621
}
626
- <- doneChan
627
622
})
628
623
629
624
t .Run ("ParameterOptionDisappeared" , func (t * testing.T ) {
@@ -668,13 +663,8 @@ func TestUpdateValidateRichParameters(t *testing.T) {
668
663
// Update the workspace
669
664
inv , root = clitest .New (t , "update" , "my-workspace" )
670
665
clitest .SetupConfig (t , client , root )
671
- doneChan := make (chan struct {})
672
666
pty := ptytest .New (t ).Attach (inv )
673
- go func () {
674
- defer close (doneChan )
675
- err := inv .Run ()
676
- assert .NoError (t , err )
677
- }()
667
+ clitest .Start (t , inv )
678
668
679
669
matches := []string {
680
670
stringParameterName , "Third option" ,
@@ -689,7 +679,6 @@ func TestUpdateValidateRichParameters(t *testing.T) {
689
679
pty .WriteLine (value )
690
680
}
691
681
}
692
- <- doneChan
693
682
})
694
683
695
684
t .Run ("ImmutableRequiredParameterExists_MutableRequiredParameterAdded" , func (t * testing.T ) {
0 commit comments