Skip to content

test: Add missing integration tests to improve coverage for identified gaps - #429

Merged
ykim-akamai merged 5 commits into
linode:devfrom
ykim-akamai:test/fill_test_gaps_in_models
Jul 7, 2024
Merged

test: Add missing integration tests to improve coverage for identified gaps#429
ykim-akamai merged 5 commits into
linode:devfrom
ykim-akamai:test/fill_test_gaps_in_models

Conversation

@ykim-akamai

@ykim-akamai ykim-akamai commented Jun 27, 2024

Copy link
Copy Markdown
Contributor

📝 Description

Filling in identified test gaps found in spike - TPT-2699. Integration Tests have been added to following test suites:

  • Account
  • LKE
  • Longview
  • Object Storage
  • Profile

For more details refer to spreadsheet attached in TPT-3010

✔️ How to Test

make TEST_SUITE="login_client" testint 
make TEST_SUITE="account" testint  
make TEST_SUITE="lke" testint  
make TEST_SUITE="longview" testint  
make TEST_SUITE="objectstorage" testint
make TEST_SUITE="profile" testint

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@ykim-akamai
ykim-akamai requested a review from a team as a code owner June 27, 2024 01:34
@ykim-akamai
ykim-akamai requested review from ezilber-akamai and yec-akamai and removed request for a team June 27, 2024 01:34
@ykim-akamai
ykim-akamai marked this pull request as draft June 27, 2024 01:34
@ykim-akamai ykim-akamai changed the title test: Fill test gaps in models and improve fixtures test: Add missing integration tests to improve coverage for identified gaps Jun 27, 2024
@ykim-akamai ykim-akamai added the testing for updates to the testing suite in the changelog. label Jun 27, 2024
@ykim-akamai
ykim-akamai marked this pull request as ready for review June 27, 2024 16:39

@ezilber-akamai ezilber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

test_get_current_longview_plan is failing locally for me with the following error:

test_linode_client = <linode_api4.linode_client.LinodeClient object at 0x10554cda0>

    def test_get_current_longview_plan(test_linode_client):
        lv_plan = test_linode_client.load(LongviewPlan, "")
    
>       assert "Longview" in lv_plan.label
E       TypeError: argument of type 'NoneType' is not iterable

test/integration/models/longview/test_longview.py:58: TypeError
=========================================================================== short test summary info ===========================================================================
FAILED test/integration/models/longview/test_longview.py::test_get_current_longview_plan - TypeError: argument of type 'NoneType' is not iterable

After I changed my Longview plan from Longview Free to Longview Pro 3 pack, it passed. Is this the intended behavior?

@ykim-akamai

Copy link
Copy Markdown
Contributor Author

test_get_current_longview_plan is failing locally for me with the following error:

test_linode_client = <linode_api4.linode_client.LinodeClient object at 0x10554cda0>

    def test_get_current_longview_plan(test_linode_client):
        lv_plan = test_linode_client.load(LongviewPlan, "")
    
>       assert "Longview" in lv_plan.label
E       TypeError: argument of type 'NoneType' is not iterable

test/integration/models/longview/test_longview.py:58: TypeError
=========================================================================== short test summary info ===========================================================================
FAILED test/integration/models/longview/test_longview.py::test_get_current_longview_plan - TypeError: argument of type 'NoneType' is not iterable

After I changed my Longview plan from Longview Free to Longview Pro 3 pack, it passed. Is this the intended behavior?

Good catch, looks like Longview free plan actually does not return anything and update using longview_plan_update() function is not allowed. I revised the assertion so it only checks when something is returned

@yec-akamai yec-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests passed locally, nice work!

@ykim-akamai
ykim-akamai merged commit 2d9a09e into linode:dev Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants