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

[GCU] Undefined variable in test_ecn_config_updates #8648

Closed
bingwang-ms opened this issue Jun 16, 2023 · 3 comments
Closed

[GCU] Undefined variable in test_ecn_config_updates #8648

bingwang-ms opened this issue Jun 16, 2023 · 3 comments
Assignees

Comments

@bingwang-ms
Copy link
Collaborator

If is_valid_platform_and_version returns False, we will see below exception

**Description**

        try:
            if is_valid_platform_and_version(duthost, "WRED_PROFILE", "ECN tuning"):
                output = apply_patch(duthost, json_data=json_patch, dest_file=tmpfile)
                expect_op_success(duthost, output)
                ensure_application_of_updated_config(duthost, configdb_field, ",".join(values))
            else:
>               expect_op_failure(output)
E               UnboundLocalError: local variable 'output' referenced before assignment

It's because the output variable is not defined.

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```
@bingwang-ms
Copy link
Collaborator Author

@isabelmsft Please check if the test case can run on Mellanox SPC3 platform, such as Mellanox-SN4600. Thanks

@isabelmsft
Copy link
Contributor

Test case bug fixed in PR https://github.com/sonic-net/sonic-mgmt/pull/8652/files, requested review from scenario owner @neethajohn

@bingwang-ms
Copy link
Collaborator Author

Fixed.

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 a pull request may close this issue.

2 participants