1
1
package integration
2
2
3
3
import (
4
- "fmt"
5
4
"os"
6
5
"path/filepath"
7
6
"strings"
@@ -11,7 +10,6 @@ import (
11
10
"github.com/ActiveState/termtest"
12
11
13
12
"github.com/ActiveState/cli/internal/constants"
14
- "github.com/ActiveState/cli/internal/strutils"
15
13
"github.com/ActiveState/cli/internal/testhelpers/e2e"
16
14
"github.com/ActiveState/cli/internal/testhelpers/osutil"
17
15
"github.com/ActiveState/cli/internal/testhelpers/suite"
@@ -87,21 +85,16 @@ func (suite *ImportIntegrationTestSuite) TestImport() {
87
85
defer ts .Close ()
88
86
89
87
ts .LoginAsPersistentUser ()
90
- pname := strutils .UUID ()
91
- namespace := fmt .Sprintf ("%s/%s" , e2e .PersistentUsername , pname .String ())
92
88
93
- cp := ts .Spawn ("init" , "--language" , "python" , namespace , ts .Dirs .Work )
94
- cp .Expect ("successfully initialized" , e2e .RuntimeSourcingTimeoutOpt )
95
- cp .ExpectExitCode (0 )
96
- ts .NotifyProjectCreated (e2e .PersistentUsername , pname .String ())
89
+ ts .PrepareProject ("ActiveState-CLI/small-python" , "5a1e49e5-8ceb-4a09-b605-ed334474855b" )
97
90
98
- reqsFilePath := filepath .Join (cp . WorkDirectory () , reqsFileName )
91
+ reqsFilePath := filepath .Join (ts . Dirs . Work , reqsFileName )
99
92
100
93
suite .Run ("invalid requirements.txt" , func () {
101
94
ts .SetT (suite .T ())
102
95
ts .PrepareFile (reqsFilePath , badReqsData )
103
96
104
- cp = ts .Spawn ("import" , "requirements.txt" )
97
+ cp : = ts .Spawn ("import" , "requirements.txt" )
105
98
cp .ExpectNotExitCode (0 )
106
99
})
107
100
@@ -137,9 +130,9 @@ func (suite *ImportIntegrationTestSuite) TestImport() {
137
130
cp .Expect (">=0.6.1 →" )
138
131
cp .Expect ("Mopidy-Dirble" )
139
132
cp .Expect ("requests" )
140
- cp .Expect (">=2.2,<2.31.0 → 2.30.0 " )
133
+ cp .Expect (">=2.2,<2.31.0 → " )
141
134
cp .Expect ("urllib3" )
142
- cp .Expect (">=1.21.1,<=1.26.5 → 1.26.5 " )
135
+ cp .Expect (">=1.21.1,<=1.26.5 → " )
143
136
cp .ExpectExitCode (0 )
144
137
})
145
138
ts .IgnoreLogErrors ()
0 commit comments