github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/test/integration/progress_int_test.go (about) 1 package integration 2 3 import ( 4 "testing" 5 6 "github.com/ActiveState/cli/internal/constants" 7 "github.com/ActiveState/cli/internal/locale" 8 "github.com/ActiveState/cli/internal/testhelpers/e2e" 9 "github.com/ActiveState/cli/internal/testhelpers/suite" 10 "github.com/ActiveState/cli/internal/testhelpers/tagsuite" 11 ) 12 13 type ProgressIntegrationTestSuite struct { 14 tagsuite.Suite 15 } 16 17 func (suite *ProgressIntegrationTestSuite) TestProgress() { 18 suite.OnlyRunForTags(tagsuite.Progress) 19 ts := e2e.New(suite.T(), false) 20 defer ts.Close() 21 22 cp := ts.SpawnWithOpts( 23 e2e.OptArgs("checkout", "ActiveState-CLI/small-python"), 24 e2e.OptAppendEnv(constants.DisableRuntime+"=false"), 25 ) 26 cp.Expect(locale.T("setup_runtime")) 27 cp.Expect("Checked out", e2e.RuntimeSourcingTimeoutOpt) 28 suite.Assert().NotContains(cp.Output(), "...") 29 cp.ExpectExitCode(0) 30 31 cp = ts.SpawnWithOpts( 32 e2e.OptArgs("checkout", "ActiveState-CLI/small-python", "small-python2", "--non-interactive"), 33 e2e.OptAppendEnv(constants.DisableRuntime+"=false"), 34 ) 35 cp.Expect(locale.T("setup_runtime")) 36 cp.Expect("...") 37 cp.Expect("Checked out", e2e.RuntimeSourcingTimeoutOpt) 38 cp.ExpectExitCode(0) 39 } 40 41 func TestProgressIntegrationTestSuite(t *testing.T) { 42 suite.Run(t, new(ProgressIntegrationTestSuite)) 43 }