Skip to content

Commit 7976d86

Browse files
authored
Merge pull request #3787 from ActiveState/mitchell/cp-1144
Attempt to fix failing integration tests by bumping their projects' timestamps.
2 parents 5e3a8c3 + 5a2aa0b commit 7976d86

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

test/integration/commit_int_test.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ func (suite *CommitIntegrationTestSuite) TestCommitAtTimeChange() {
6767
ts := e2e.New(suite.T(), false)
6868
defer ts.Close()
6969

70-
ts.PrepareProjectAndBuildScript("ActiveState-CLI/Commit-Test-A", "7a1b416e-c17f-4d4a-9e27-cbad9e8f5655")
70+
ts.PrepareProjectAndBuildScript("ActiveState-CLI/Commit-Test-A", "2ab50eba-4410-4be2-ba9d-c04ebeda640d")
7171

7272
proj, err := project.FromPath(ts.Dirs.Work)
7373
suite.NoError(err, "Error loading project")
@@ -76,11 +76,11 @@ func (suite *CommitIntegrationTestSuite) TestCommitAtTimeChange() {
7676
suite.Require().NoError(err) // verify validity
7777

7878
// Update top-level at_time variable.
79-
dateTime := "2023-06-21T12:34:56Z"
79+
dateTime := "2025-12-11T12:34:56Z"
8080
buildScriptFile := filepath.Join(proj.Dir(), constants.BuildScriptFileName)
8181
contents, err := fileutils.ReadFile(buildScriptFile)
8282
suite.Require().NoError(err)
83-
contents = bytes.Replace(contents, []byte("2023-06-22T21:56:10Z"), []byte(dateTime), 1)
83+
contents = bytes.Replace(contents, []byte("2025-12-10T17:03:26Z"), []byte(dateTime), 1)
8484
suite.Require().NoError(fileutils.WriteFile(buildScriptFile, contents))
8585
suite.Require().Contains(string(fileutils.ReadFileUnsafe(filepath.Join(proj.Dir(), constants.BuildScriptFileName))), dateTime)
8686

@@ -152,14 +152,16 @@ func (suite *CommitIntegrationTestSuite) TestCommitSkipValidation() {
152152
suite.Require().NoError(fileutils.WriteFile(scriptPath, data))
153153

154154
cp := ts.Spawn("commit")
155-
cp.Expect("solver_version in body should be")
155+
cp.Expect("solver_version")
156+
cp.Expect("should be")
156157
cp.ExpectExitCode(1)
157158

158159
cp = ts.Spawn("commit", "--skip-validation")
159160
cp.ExpectExitCode(0)
160161

161162
cp = ts.Spawn("refresh")
162-
cp.Expect("solver_version in body should be")
163+
cp.Expect("solver_version")
164+
cp.Expect("should be")
163165
cp.ExpectExitCode(1)
164166
}
165167

test/integration/package_int_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -679,12 +679,14 @@ func (suite *PackageIntegrationTestSuite) TestChangeSummary() {
679679
cp.Expect("Successfully set")
680680
cp.ExpectExitCode(0)
681681

682-
ts.PrepareProject("ActiveState-CLI/small-python", "5a1e49e5-8ceb-4a09-b605-ed334474855b")
682+
ts.PrepareProject("ActiveState-CLI/small-python", "66f0259d-5d7a-48ce-a814-fd9db46c5ce6")
683683

684684
cp = ts.Spawn("install", "[email protected]")
685685
cp.Expect("Resolving Dependencies")
686686
cp.Expect("Done")
687-
cp.Expect("Installing [email protected] includes 4 direct dependencies")
687+
cp.Expect("Installing")
688+
cp.Expect("[email protected]")
689+
cp.Expect("includes 4 direct dependencies")
688690
cp.Expect("├─ ")
689691
cp.Expect("├─ ")
690692
cp.Expect("├─ ")

test/integration/revert_int_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ func (suite *RevertIntegrationTestSuite) TestRevert() {
2424
defer ts.Close()
2525

2626
namespace := "ActiveState-CLI/Revert"
27-
ts.PrepareProject(namespace, "903bf49a-6719-47f0-ae70-450d69532ece")
27+
ts.PrepareProject(namespace, "ca615135-ef95-4392-aff5-85b6c7132789")
2828

2929
// Revert the commit that added urllib3.
30-
commitID := "1f4f4f7d-7883-400e-b2ad-a5803c018ecd"
30+
commitID := "c44885ee-af0e-4f52-b8ef-63c56fe255c6"
3131
cp := ts.Spawn("revert", commitID)
3232
cp.Expect(fmt.Sprintf("Operating on project %s", namespace))
3333
cp.Expect("You are about to revert the following commit:")
@@ -48,7 +48,7 @@ func (suite *RevertIntegrationTestSuite) TestRevert() {
4848
cp = ts.Spawn("shell", "Revert")
4949
cp.ExpectInput(e2e.RuntimeSourcingTimeoutOpt)
5050
cp.SendLine("python3")
51-
cp.Expect("3.9.15")
51+
cp.Expect("3.11.12")
5252
cp.SendLine("import urllib3")
5353
cp.Expect("No module named 'urllib3'")
5454
cp.SendLine("import argparse")
@@ -63,7 +63,7 @@ func (suite *RevertIntegrationTestSuite) TestRevertRemote() {
6363
ts := e2e.New(suite.T(), false)
6464
defer ts.Close()
6565

66-
ts.PrepareProject("ActiveState-CLI/Revert", "75ae9c67-df55-4a95-be6f-b7975e5bb523")
66+
ts.PrepareProject("ActiveState-CLI/Revert", "ca615135-ef95-4392-aff5-85b6c7132789")
6767

6868
cp := ts.Spawn("config", "set", constants.AsyncRuntimeConfig, "true")
6969
cp.ExpectExitCode(0)
@@ -106,13 +106,13 @@ func (suite *RevertIntegrationTestSuite) TestRevertTo() {
106106
defer ts.Close()
107107

108108
namespace := "ActiveState-CLI/Revert"
109-
ts.PrepareProject(namespace, "903bf49a-6719-47f0-ae70-450d69532ece")
109+
ts.PrepareProject(namespace, "ca615135-ef95-4392-aff5-85b6c7132789")
110110

111111
cp := ts.Spawn("config", "set", constants.AsyncRuntimeConfig, "true")
112112
cp.ExpectExitCode(0)
113113

114114
// Revert the commit that added urllib3.
115-
commitID := "1f4f4f7d-7883-400e-b2ad-a5803c018ecd"
115+
commitID := "c44885ee-af0e-4f52-b8ef-63c56fe255c6"
116116
cp = ts.Spawn("revert", "--to", commitID)
117117
cp.Expect(fmt.Sprintf("Operating on project %s", namespace))
118118
cp.Expect("You are about to revert to the following commit:")
@@ -153,12 +153,12 @@ func (suite *RevertIntegrationTestSuite) TestJSON() {
153153
ts := e2e.New(suite.T(), false)
154154
defer ts.Close()
155155

156-
ts.PrepareProject("ActiveState-CLI/Revert", "903bf49a-6719-47f0-ae70-450d69532ece")
156+
ts.PrepareProject("ActiveState-CLI/Revert", "ca615135-ef95-4392-aff5-85b6c7132789")
157157

158158
cp := ts.Spawn("config", "set", constants.AsyncRuntimeConfig, "true")
159159
cp.ExpectExitCode(0)
160160

161-
cp = ts.Spawn("revert", "--to", "1f4f4f7d-7883-400e-b2ad-a5803c018ecd", "-o", "json")
161+
cp = ts.Spawn("revert", "--to", "c44885ee-af0e-4f52-b8ef-63c56fe255c6", "-o", "json")
162162
cp.Expect(`{"current_commit_id":`, e2e.RuntimeSourcingTimeoutOpt)
163163
cp.ExpectExitCode(0)
164164
AssertValidJSON(suite.T(), cp)

0 commit comments

Comments
 (0)