forked from erda-project/erda
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feature: scene set supports parallel in autoTest (erda-project#2173)
* feature: scene set supports parallel in autoTest * add ListTestPlanV2Step api * update move group * add split op of render * fix: add unit test * add unit test * add unit test for render * add migrations * polish code * fix: update timeout of Test_initCron
- Loading branch information
1 parent
7a2e43f
commit 3e69231
Showing
17 changed files
with
1,046 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE `dice_autotest_plan_step` ADD `group_id` BIGINT(20) NOT NULL DEFAULT 0 COMMENT 'auto test plan step group'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) 2021 Terminus, Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package apistructs | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
"k8s.io/apimachinery/pkg/util/rand" | ||
) | ||
|
||
func TestSceneSetRequestValidate(t *testing.T) { | ||
tt := []struct { | ||
req SceneSetRequest | ||
want bool | ||
}{ | ||
{SceneSetRequest{Name: rand.String(50), Description: "1"}, true}, | ||
{SceneSetRequest{Name: rand.String(51), Description: "1"}, false}, | ||
{SceneSetRequest{Name: "1", Description: rand.String(255)}, true}, | ||
{SceneSetRequest{Name: "1", Description: rand.String(256)}, false}, | ||
{SceneSetRequest{Name: "****", Description: "1"}, false}, | ||
{SceneSetRequest{Name: "/", Description: "1"}, false}, | ||
{SceneSetRequest{Name: "_abd1", Description: "1"}, true}, | ||
{SceneSetRequest{Name: "_测试", Description: "1"}, true}, | ||
{SceneSetRequest{Name: "1_测试a", Description: "1"}, true}, | ||
{SceneSetRequest{Name: "a_测试1", Description: "1"}, true}, | ||
} | ||
for _, v := range tt { | ||
assert.Equal(t, v.want, v.req.Validate() == nil) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.