Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testcase: Improve the effectiveness of test cases #4530

Merged
merged 1 commit into from Jan 27, 2022

Conversation

Wanghx0991
Copy link
Contributor

No description provided.

@@ -86,18 +86,18 @@ func TestAccAlicloudECIOpenAPIImageCache_basic(t *testing.T) {
{
Config: testAccConfig(map[string]interface{}{
"image_cache_name": strings.ToLower(name),
"images": []string{"registry.cn-beijing.aliyuncs.com/sceneplatform/sae-image-demo:latest"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

镜像已经找不到了

fileter_list = make(map[string][]string, 0)
// map[resourceName][]string{WhiteField}
filterList = map[string][]string{
"alicloud_amqp_instance":[]string{"logistics"},
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这块加了下白名单, 填入的不再做校验了

@Wanghx0991 Wanghx0991 force-pushed the test_fix branch 8 times, most recently from f1d146e to a1057ef Compare January 26, 2022 02:22
ioutil.WriteFile(file.(string), []byte(response["PrivateKeyBody"].(string)), 0600)
os.Chmod(file.(string), 0400)
if v, exist := response["PrivateKeyBody"]; exist {
err := ioutil.WriteFile(file.(string), []byte(v.(string)), 0600)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里的err需要处理 否则CI没有通过

@@ -171,7 +171,7 @@ func resourceAliyunEipAssociationDelete(d *schema.ResourceData, meta interface{}
})
if err != nil {
if IsExpectedErrors(err, []string{"IncorrectInstanceStatus", "IncorrectHaVipStatus", "TaskConflict",
"InvalidIpStatus.HasBeenUsedBySnatTable", "InvalidIpStatus.HasBeenUsedByForwardEntry"}) {
"InvalidIpStatus.HasBeenUsedBySnatTable", "InvalidIpStatus.HasBeenUsedByForwardEntry", "InvalidStatus.EniStatusNotSupport"}) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

值班的一个问题 删除报错 需要重试

@@ -34,7 +34,10 @@ func init() {
var (
resourceName = flag.String("resource", "", "the name of the terraform resource to diff")
fileName = flag.String("file_name", "", "the file to check diff")
fileter_list = make(map[string][]string, 0)
// map[resourceName][]string{WhiteField}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

删掉无用的注释

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@xiaozhu36 xiaozhu36 merged commit 0a9cb98 into aliyun:master Jan 27, 2022
@Wanghx0991 Wanghx0991 deleted the test_fix branch January 27, 2022 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants