Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

Commit

Permalink
test: add unit test case for func GetSuperCID
Browse files Browse the repository at this point in the history
Signed-off-by: Hu Shuai <[email protected]>
  • Loading branch information
hs0210 committed Apr 8, 2020
1 parent 9a4e7b0 commit 0d5bc54
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions supernode/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,11 @@ func (s *SupernodeConfigTestSuite) TestConfig_Load(c *check.C) {
p := &PluginProperties{Name: "local", Enabled: true, Config: "baseDir: /tmp/supernode/repo\n"}
c.Assert(conf.Plugins[StoragePlugin][0], check.DeepEquals, p)
}

func (s *SupernodeConfigTestSuite) TestGetSuperCID(c *check.C) {
conf := Config{
BaseProperties: &BaseProperties{cIDPrefix: "CIDPrefix"},
}

c.Assert(conf.GetSuperCID("taskID"), check.DeepEquals, "CIDPrefixtaskID")
}

0 comments on commit 0d5bc54

Please sign in to comment.