Skip to content

Commit

Permalink
add test clean up
Browse files Browse the repository at this point in the history
Signed-off-by: Qiaozp <qiaozhongpei.qzp@alibaba-inc.com>
  • Loading branch information
chivalryq committed Aug 2, 2023
1 parent 0dd7c60 commit 287da88
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/server/domain/service/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,9 @@ var _ = Describe("Test config service", func() {
By("create a project")
_, err = projectService.CreateProject(context.TODO(), v1.CreateProjectRequest{Name: "some-project"})
Expect(err).To(BeNil())
defer func() {
Expect(projectService.DeleteProject(context.Background(), "some-project")).To(BeNil())
}()
By("create a common global config")
_, err = configService.CreateConfig(context.TODO(), NoProject, v1.CreateConfigRequest{
Name: "helm-test",
Expand All @@ -267,6 +270,9 @@ var _ = Describe("Test config service", func() {
Properties: `{"username":"test","password":"test","url":"https://helm.kubevela.com/charts"}`,
})
Expect(err).To(BeNil())
defer func() {
Expect(configService.DeleteConfig(context.Background(), NoProject, "helm-test")).To(BeNil())
}()
By("try to get the config in project, should success")
config, err := configService.GetConfig(context.TODO(), "some-project", "helm-test")
Expect(err).To(BeNil())
Expand Down

0 comments on commit 287da88

Please sign in to comment.