Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
Signed-off-by: 张启航 <[email protected]>
  • Loading branch information
ZhangSetSail committed Jan 9, 2025
1 parent 19d035f commit 4f6f63a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion db/mysql/dao/over_score.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func (t *OverScoreDaoImpl) GetOverScoreRate() (*model.EnterpriseOverScore, error
if err == gorm.ErrRecordNotFound {
// Create default record with rate 1
overScore = model.EnterpriseOverScore{
OverScoreRate: "1",
OverScoreRate: "{\"CPU\":1,\"MEMORY\":1}",
}
if err := t.DB.Create(&overScore).Error; err != nil {
return nil, err
Expand Down
6 changes: 3 additions & 3 deletions worker/appm/volume/volcengine.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,13 @@ type VolcengineVolume struct {
func (v *VolcengineVolume) CreateVolume(define *Define) error {
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
defer cancel()
sc, err := k8s.Default().Clientset.StorageV1().StorageClasses().Get(ctx, define.as.K8sComponentName, metav1.GetOptions{})
sc, err := k8s.Default().Clientset.StorageV1().StorageClasses().Get(ctx, v.as.K8sComponentName, metav1.GetOptions{})
if err != nil {
if k8serror.IsNotFound(err) {
fileDomain, err := filepersistence.Default().FilePersistenceCli.CreateFileSystem(
ctx,
&filepersistence.CreateFileSystemOptions{
Name: define.as.K8sComponentName,
Name: v.as.K8sComponentName,
ProtocolType: "NFS",
StorageType: "Standard",
Size: 100 * 1024 * 1024 * 1024,
Expand All @@ -47,7 +47,7 @@ func (v *VolcengineVolume) CreateVolume(define *Define) error {
volumeBindingMode := storagev1.VolumeBindingImmediate
sc = &storagev1.StorageClass{
ObjectMeta: metav1.ObjectMeta{
Name: define.as.K8sComponentName,
Name: v.as.K8sComponentName,
},
Provisioner: "nas.csi.volcengine.com",
Parameters: map[string]string{
Expand Down

0 comments on commit 4f6f63a

Please sign in to comment.