-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ':' as a package namespace separator instead of '/'.
Also added an integration test for it.
- Loading branch information
1 parent
16d1a9d
commit af5ee7d
Showing
3 changed files
with
16 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,13 +53,13 @@ func TestPackageValue_Set(t *testing.T) { | |
}{ | ||
{ | ||
"namespace, name and version", | ||
"namespace/path/[email protected]", | ||
"namespace/path:[email protected]", | ||
false, | ||
&PackageValue{Namespace: "namespace/path", Name: "name", Version: "1.0.0"}, | ||
}, | ||
{ | ||
"namespace and name", | ||
"namespace/path/name", | ||
"namespace/path:name", | ||
false, | ||
&PackageValue{Namespace: "namespace/path", Name: "name"}, | ||
}, | ||
|
@@ -99,13 +99,13 @@ func TestPackageFlagNSRequired_Set(t *testing.T) { | |
}{ | ||
{ | ||
"namespace, name and version", | ||
"namespace/path/[email protected]", | ||
"namespace/path:[email protected]", | ||
false, | ||
&PackageValueNSRequired{PackageValue{Namespace: "namespace/path", Name: "name", Version: "1.0.0"}}, | ||
}, | ||
{ | ||
"namespace and name", | ||
"namespace/path/name", | ||
"namespace/path:name", | ||
false, | ||
&PackageValueNSRequired{PackageValue{Namespace: "namespace/path", Name: "name"}}, | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -746,7 +746,7 @@ func (suite *PackageIntegrationTestSuite) TestCVE_Indirect() { | |
cp.ExpectExitCode(0) | ||
|
||
cp = ts.SpawnWithOpts( | ||
e2e.OptArgs("install", "private/ActiveState-CLI-Testing/language/python/django_dep", "--ts=now"), | ||
e2e.OptArgs("install", "org/cli-integration-tests/language/python:django_dep", "--ts=now"), | ||
e2e.OptAppendEnv(constants.DisableRuntime+"=false"), | ||
) | ||
cp.ExpectRe(`Warning: Dependency has \d indirect known vulnerabilities`, e2e.RuntimeSourcingTimeoutOpt) | ||
|
@@ -755,30 +755,16 @@ func (suite *PackageIntegrationTestSuite) TestCVE_Indirect() { | |
cp.ExpectExitCode(1) | ||
} | ||
|
||
func (suite *PackageIntegrationTestSuite) TestChangeSummary() { | ||
suite.OnlyRunForTags(tagsuite.Package) | ||
func (suite *InstallIntegrationTestSuite) TestNamespace() { | ||
suite.OnlyRunForTags(tagsuite.Install) | ||
ts := e2e.New(suite.T(), false) | ||
defer ts.Close() | ||
|
||
cp := ts.Spawn("config", "set", constants.AsyncRuntimeConfig, "true") | ||
cp.Expect("Successfully set") | ||
cp.ExpectExitCode(0) | ||
|
||
cp = ts.Spawn("checkout", "ActiveState-CLI/small-python", ".") | ||
cp.Expect("Checked out") | ||
cp.ExpectExitCode(0) | ||
|
||
cp = ts.SpawnWithOpts( | ||
e2e.OptArgs("install", "[email protected]"), | ||
ts.PrepareProject("ActiveState-CLI/small-python", "5a1e49e5-8ceb-4a09-b605-ed334474855b") | ||
cp := ts.SpawnWithOpts( | ||
e2e.OptArgs("install", "language/python:requests"), | ||
e2e.OptAppendEnv(constants.DisableRuntime+"=false"), | ||
) | ||
cp.Expect("Resolving Dependencies") | ||
cp.Expect("Done") | ||
cp.Expect("Installing [email protected] includes 4 direct dependencies") | ||
cp.Expect("├─ ") | ||
cp.Expect("├─ ") | ||
cp.Expect("├─ ") | ||
cp.Expect("└─ ") | ||
cp.Expect("Package added: requests", e2e.RuntimeSourcingTimeoutOpt) | ||
cp.ExpectExitCode(0) | ||
} | ||
|