diff options
author | Wayne Starr <Racer159@users.noreply.github.com> | 2022-11-09 09:02:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-09 23:02:21 +0800 |
commit | 3c07ed091174f4258ae930b5516b2cf773ac313d (patch) | |
tree | 859b6ec36972cd3cc5c16ca2d6b72b31b6ec87a0 /integrations | |
parent | 995ae06a6e02b7fb1938bb7ac2a1d5fe10be55b1 (diff) | |
download | gitea-3c07ed091174f4258ae930b5516b2cf773ac313d.tar.gz gitea-3c07ed091174f4258ae930b5516b2cf773ac313d.zip |
Remove semver compatible flag and change pypi to an array of test cases (#21708) (#21729)
Backport (#21708)
This addresses #21707 and adds a second package test case for a
non-semver compatible version (this might be overkill though since you
could also edit the old package version to have an epoch in front and
see the error, this just seemed more flexible for the future).
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Diffstat (limited to 'integrations')
-rw-r--r-- | integrations/api_packages_pypi_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/integrations/api_packages_pypi_test.go b/integrations/api_packages_pypi_test.go index cbb4202073..a04ee127d8 100644 --- a/integrations/api_packages_pypi_test.go +++ b/integrations/api_packages_pypi_test.go @@ -28,7 +28,7 @@ func TestPackagePyPI(t *testing.T) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}).(*user_model.User) packageName := "test-package" - packageVersion := "1.0.1+r1234" + packageVersion := "1!1.0.1+r1234" packageAuthor := "KN4CK3R" packageDescription := "Test Description" @@ -71,7 +71,7 @@ func TestPackagePyPI(t *testing.T) { pd, err := packages.GetPackageDescriptor(db.DefaultContext, pvs[0]) assert.NoError(t, err) - assert.NotNil(t, pd.SemVer) + assert.Nil(t, pd.SemVer) assert.IsType(t, &pypi.Metadata{}, pd.Metadata) assert.Equal(t, packageName, pd.Package.Name) assert.Equal(t, packageVersion, pd.Version.Version) @@ -99,7 +99,7 @@ func TestPackagePyPI(t *testing.T) { pd, err := packages.GetPackageDescriptor(db.DefaultContext, pvs[0]) assert.NoError(t, err) - assert.NotNil(t, pd.SemVer) + assert.Nil(t, pd.SemVer) assert.IsType(t, &pypi.Metadata{}, pd.Metadata) assert.Equal(t, packageName, pd.Package.Name) assert.Equal(t, packageVersion, pd.Version.Version) |