diff options
author | Wayne Starr <Racer159@users.noreply.github.com> | 2022-11-07 19:41:39 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-08 09:41:39 +0800 |
commit | 8c1d9885e5360111400bd4fb729f743065037d69 (patch) | |
tree | f662b8826b616223d3fa325543fed3576bd9bd16 /tests/integration | |
parent | fd89c062bda0f3b159a01aab3d67a7fa2f42334e (diff) | |
download | gitea-8c1d9885e5360111400bd4fb729f743065037d69.tar.gz gitea-8c1d9885e5360111400bd4fb729f743065037d69.zip |
Remove semver compatible flag and change pypi to an array of test cases (#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 'tests/integration')
-rw-r--r-- | tests/integration/api_packages_pypi_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/integration/api_packages_pypi_test.go b/tests/integration/api_packages_pypi_test.go index 0cd6ff7d13..83719dcca0 100644 --- a/tests/integration/api_packages_pypi_test.go +++ b/tests/integration/api_packages_pypi_test.go @@ -29,7 +29,7 @@ func TestPackagePyPI(t *testing.T) { user := unittest.AssertExistsAndLoadBean(t, &user_model.User{ID: 2}) packageName := "test-package" - packageVersion := "1.0.1+r1234" + packageVersion := "1!1.0.1+r1234" packageAuthor := "KN4CK3R" packageDescription := "Test Description" @@ -72,7 +72,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) @@ -100,7 +100,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) |