Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions test/integration/commit_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (suite *CommitIntegrationTestSuite) TestCommitAtTimeChange() {
ts := e2e.New(suite.T(), false)
defer ts.Close()

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

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

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

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

cp := ts.Spawn("commit")
cp.Expect("solver_version in body should be")
cp.Expect("solver_version")
cp.Expect("should be")
cp.ExpectExitCode(1)

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

cp = ts.Spawn("refresh")
cp.Expect("solver_version in body should be")
cp.Expect("solver_version")
cp.Expect("should be")
cp.ExpectExitCode(1)
}

Expand Down
6 changes: 4 additions & 2 deletions test/integration/package_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,12 +679,14 @@ func (suite *PackageIntegrationTestSuite) TestChangeSummary() {
cp.Expect("Successfully set")
cp.ExpectExitCode(0)

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

cp = ts.Spawn("install", "[email protected]")
cp.Expect("Resolving Dependencies")
cp.Expect("Done")
cp.Expect("Installing [email protected] includes 4 direct dependencies")
cp.Expect("Installing")
cp.Expect("[email protected]")
cp.Expect("includes 4 direct dependencies")
cp.Expect("├─ ")
cp.Expect("├─ ")
cp.Expect("├─ ")
Expand Down
16 changes: 8 additions & 8 deletions test/integration/revert_int_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ func (suite *RevertIntegrationTestSuite) TestRevert() {
defer ts.Close()

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

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

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

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

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

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

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

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

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

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