feat(*): dryRun/debug mode/mode plugins/googleapis

Signed-off-by: storyicon <yuanchao@bilibili.com>
This commit is contained in:
storyicon 2021-07-21 20:25:38 +08:00
parent 9aac714c32
commit da77c8086d
No known key found for this signature in database
GPG key ID: 245915D985F966CF
26 changed files with 730 additions and 126 deletions

View file

@ -70,4 +70,22 @@ var _ = Describe("Pluginmanager", func() {
Expect(exists).To(BeTrue())
Expect(len(local) != 0).To(BeTrue())
})
It("should able to install googleapis", func() {
versions, err := manager.ListGoogleAPIsVersions(context.TODO())
Expect(err).To(BeNil())
Expect(len(versions) > 0).To(BeTrue())
latestVersion, err := manager.GetGoogleAPIsLatestVersion(context.TODO())
Expect(err).To(BeNil())
Expect(latestVersion).To(Equal(versions[len(versions)-1]))
local, err := manager.InstallGoogleAPIs(context.TODO(), latestVersion)
Expect(err).To(BeNil())
Expect(len(local) > 0).To(BeTrue())
exists, local, err := manager.IsGoogleAPIsInstalled(context.TODO(), latestVersion)
Expect(err).To(BeNil())
Expect(exists).To(BeTrue())
Expect(len(local) != 0).To(BeTrue())
})
})