Skip to content

Commit 9a43ed2

Browse files
authored
Merge pull request ActiveState#3357 from ActiveState/DX-2902
Update build expression to use state tool artifacts v1
2 parents 05c047a + af4682b commit 9a43ed2

File tree

2 files changed

+23
-14
lines changed

2 files changed

+23
-14
lines changed

pkg/buildscript/internal/buildexpression/buildexpression.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func New() (*BuildExpression, error) {
159159
}
160160
},
161161
"runtime": {
162-
"state_tool_artifacts": {
162+
"state_tool_artifacts_v1": {
163163
"src": "$sources"
164164
}
165165
},

test/integration/init_int_test.go

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,30 @@ type InitIntegrationTestSuite struct {
2424

2525
func (suite *InitIntegrationTestSuite) TestInit() {
2626
suite.OnlyRunForTags(tagsuite.Init, tagsuite.Critical)
27-
suite.runInitTest(false, "python", "python3")
27+
suite.runInitTest(false, true, "python", "python3")
2828
}
2929

3030
func (suite *InitIntegrationTestSuite) TestInit_Path() {
3131
suite.OnlyRunForTags(tagsuite.Init)
32-
suite.runInitTest(true, "python", "python3")
32+
suite.runInitTest(true, false, "python", "python3")
3333
}
3434

3535
func (suite *InitIntegrationTestSuite) TestInit_DisambiguatePython() {
3636
suite.OnlyRunForTags(tagsuite.Init)
37-
suite.runInitTest(false, "python", "python3")
38-
suite.runInitTest(false, "[email protected]", "python3")
39-
suite.runInitTest(false, "[email protected]", "python2")
37+
suite.runInitTest(false, false, "python", "python3")
38+
suite.runInitTest(false, false, "[email protected]", "python3")
39+
suite.runInitTest(false, false, "[email protected]", "python2")
4040
}
4141

4242
func (suite *InitIntegrationTestSuite) TestInit_PartialVersions() {
4343
suite.OnlyRunForTags(tagsuite.Init)
44-
suite.runInitTest(false, "[email protected]", "python3")
45-
suite.runInitTest(false, "[email protected]", "python3")
46-
suite.runInitTest(false, "python@>=3", "python3")
47-
suite.runInitTest(false, "python@2", "python2")
44+
suite.runInitTest(false, false, "[email protected]", "python3")
45+
suite.runInitTest(false, false, "[email protected]", "python3")
46+
suite.runInitTest(false, false, "python@>=3", "python3")
47+
suite.runInitTest(false, false, "python@2", "python2")
4848
}
4949

50-
func (suite *InitIntegrationTestSuite) runInitTest(addPath bool, lang string, expectedConfigLanguage string, args ...string) {
50+
func (suite *InitIntegrationTestSuite) runInitTest(addPath bool, sourceRuntime bool, lang string, expectedConfigLanguage string, args ...string) {
5151
ts := e2e.New(suite.T(), false)
5252
defer ts.Close()
5353
ts.LoginAsPersistentUser()
@@ -60,11 +60,20 @@ func (suite *InitIntegrationTestSuite) runInitTest(addPath bool, lang string, ex
6060
computedArgs = append(computedArgs, ts.Dirs.Work)
6161
}
6262

63+
env := []string{}
64+
if sourceRuntime {
65+
env = append(env, constants.DisableRuntime+"=false")
66+
}
6367
// Run `state init`, creating the project.
64-
cp := ts.Spawn(computedArgs...)
68+
cp := ts.SpawnWithOpts(
69+
e2e.OptArgs(computedArgs...),
70+
e2e.OptAppendEnv(env...),
71+
)
6572
cp.Expect("Initializing Project")
66-
cp.Expect("Skipping runtime setup")
67-
cp.Expect(fmt.Sprintf("Project '%s' has been successfully initialized", namespace))
73+
if !sourceRuntime {
74+
cp.Expect("Skipping runtime setup")
75+
}
76+
cp.Expect(fmt.Sprintf("Project '%s' has been successfully initialized", namespace), e2e.RuntimeSourcingTimeoutOpt)
6877
cp.ExpectExitCode(0)
6978
ts.NotifyProjectCreated(e2e.PersistentUsername, pname.String())
7079

0 commit comments

Comments
 (0)