mirror of
https://github.com/TECHNOFAB11/powerproto.git
synced 2025-12-11 23:50:04 +01:00
ref(git): replace git's native -sort with a thrid-party function
Signed-off-by: storyicon <storyicon@foxmail.com>
This commit is contained in:
parent
3953017597
commit
7b2c0762d4
7 changed files with 95 additions and 62 deletions
|
|
@ -25,7 +25,7 @@ import (
|
|||
"github.com/storyicon/powerproto/pkg/util/logger"
|
||||
)
|
||||
|
||||
var _ = Describe("Pluginmanager", func() {
|
||||
var _ = Describe("PluginManager", func() {
|
||||
cfg := pluginmanager.NewConfig()
|
||||
cfg.StorageDir, _ = filepath.Abs("./tests")
|
||||
|
||||
|
|
@ -72,12 +72,9 @@ var _ = Describe("Pluginmanager", func() {
|
|||
})
|
||||
It("should able to install git repos", func() {
|
||||
const uri = "https://github.com/gogo/protobuf"
|
||||
versions, err := manager.ListGitRepoVersions(context.TODO(), uri)
|
||||
Expect(err).To(BeNil())
|
||||
Expect(len(versions) > 0).To(BeTrue())
|
||||
latestVersion, err := manager.GetGitRepoLatestVersion(context.TODO(), uri)
|
||||
Expect(err).To(BeNil())
|
||||
Expect(latestVersion).To(Equal(versions[len(versions)-1]))
|
||||
Expect(len(latestVersion) > 0).To(Equal(true))
|
||||
|
||||
local, err := manager.InstallGitRepo(context.TODO(), uri, latestVersion)
|
||||
Expect(err).To(BeNil())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue