Skip to content

Commit

Permalink
test: add test cases for GetProductName
Browse files Browse the repository at this point in the history
  • Loading branch information
JacksonTian authored and yndu13 committed Jan 4, 2024
1 parent e7ebb7d commit 33dcce7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions newmeta/meta_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@ func TestGetMetadata(t *testing.T) {
assert.Greater(t, len(content), 100)
}

func TestGetProductName(t *testing.T) {
name, err := GetProductName("en", "ecs")
assert.Nil(t, err)
assert.Equal(t, "Elastic Compute Service", name)
name, err = GetProductName("zh", "ecs")
assert.Nil(t, err)
assert.Equal(t, "云服务器 ECS", name)
}

func TestGetAPI(t *testing.T) {
api, err := GetAPI("en", "ecs", "DescribeRegions")
assert.Nil(t, err)
Expand Down

0 comments on commit 33dcce7

Please sign in to comment.