Skip to content

Commit

Permalink
Add product type to get logstore response
Browse files Browse the repository at this point in the history
  • Loading branch information
ke.like committed Oct 27, 2022
1 parent bd1a0c4 commit 74b7add
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions client_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,11 @@ func (s *LostoreTestSuite) SetupSuite() {
require.NotEmpty(s.T(), s.accessKeySecret)
_, err := s.client.CreateProject(s.projectName, "ProjectAlreadyExist")
require.True(s.T(), err == nil || strings.Contains(err.Error(), ""))
time.Sleep(time.Second * 10)
err = s.client.CreateLogStore(s.projectName, s.logstoreName, 12, 1, false, 64)
require.NoError(s.T(), err)
time.Sleep(time.Second * 10)
logstore, err := s.client.GetLogStore(s.projectName, s.logstoreName)
require.NoError(s.T(), err)
require.Equal(s.T(), logstore.ProductType, "")
err = s.client.CreateIndex(s.projectName, s.logstoreName, Index{
Keys: map[string]IndexKey{
"col_0": {
Expand Down Expand Up @@ -98,14 +99,14 @@ func (s *LostoreTestSuite) TestSplitShardDefault() {

_, err := s.client.SplitShard(s.projectName, s.logstoreName, id, "ef000000000000000000000000000000")
assert.NoError(s.T(), err)
time.Sleep(20 * time.Second)
time.Sleep(60 * time.Second)
num2, id2 := find()
assert.True(s.T(), id2 != -1)
assert.Equal(s.T(), num2, 2)

_, err = s.client.SplitNumShard(s.projectName, s.logstoreName, id2, 3)
assert.NoError(s.T(), err)
time.Sleep(20 * time.Second)
time.Sleep(60 * time.Second)
num3, id3 := find()
assert.True(s.T(), id3 != -1)
assert.Equal(s.T(), 4, num3)
Expand Down
1 change: 1 addition & 0 deletions log_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type LogStore struct {
project *LogProject
putLogCompressType int
EncryptConf *EncryptConf `json:"encrypt_conf,omitempty"`
ProductType string `json:"productType,omitempty"`
}

// Shard defines shard struct
Expand Down

0 comments on commit 74b7add

Please sign in to comment.