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

Replace get_client with test_linode_client #346

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Nov 7, 2023

📝 Description

Test fixture get_client has been changed to test_linode_client in dev branch. This is to change it for VPC tests.

✔️ How to Test

pytest test/integration/models/test_vpc.py

GHA run: https://github.com/linode/linode_api4-python/actions/runs/6789530531

@zliang-akamai zliang-akamai marked this pull request as ready for review November 7, 2023 19:40
@zliang-akamai zliang-akamai requested a review from a team as a code owner November 7, 2023 19:40
@zliang-akamai zliang-akamai requested review from jriddle-linode, ykim-1, a team, amisiorek-akamai, vshanthe and lgarber-akamai and removed request for a team November 7, 2023 19:40
@zliang-akamai zliang-akamai merged commit 3e65754 into proj/vpc Nov 7, 2023
8 checks passed
zliang-akamai added a commit that referenced this pull request Nov 8, 2023
* Add support for VPCs

* Drop debug statement

* Clean up

* Revert

* oops

* Add docs

* Add reorder test

* Add reorder test

* make format

* oops

* Fix VPCSubnet docs

* Address feedback

* Use `asdict` to convert dataclass objects to dicts (#324)

* test: additional integration tests for vpc (#335)

## 📝 Description

- Extending test coverage for VPC 

## ✔️ How to Test

1. Setup API token for alpha/beta environment and export it
LINODE_TOKEN=mytoken

2. get cacert.pem (e.g. wget https://certurl.com/cacert.pem)

3. make slight modification to `def get_client()` in conftest.py
e.g. `client = LinodeClient(token,
base_url='https://api.dev.linode.com/v4beta',
ca_path='/Users/ykim/linode/ykim/linode_api4-python/cacert.pem')`

4. run test `pytest test/integration/models/test_vpc.py`


## 📷 Preview

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

---------

Co-authored-by: Zhiwei Liang <[email protected]>
Co-authored-by: Zhiwei Liang <[email protected]>

* Add `vpc_nat_1_1` to IPAddress (#342)

## 📝 Description

This change is adding `vpc_nat_1_1` to the IPAddress for VPC. If a
public IPv4 address is NAT 1:1 mapped to a private VPC IP, this field is
returned VPC IP together with the VPC and subnet ids.

Also trying to merge two commits from dev to proj/vpc to update the
feature branch. The actual change is focusing on
3206ab8.

## ✔️ How to Test

Build unit test to make sure that we can retrieve this field from
IPAddress object:
`tox`

---------

Co-authored-by: Zhiwei Liang <[email protected]>

* implementation

* fixing tests

* json_object

* Support list deserialise in `JSONObject`

* cleaning up code

* make format

* Replace `get_client` with `test_linode_client` (#346)

* fix: Handle `null` values in `JSONObject` fields (#344)

## 📝 Description

**What does this PR do and why is this change necessary?**

Handle null values for `JSONObject` fields

## ✔️ How to Test

**What are the steps to reproduce the issue or verify the changes?**

`pytest test/integration/models/test_networking.py`

---------

Co-authored-by: Lena Garber <[email protected]>
Co-authored-by: Lena Garber <[email protected]>
Co-authored-by: Youjung Kim <[email protected]>
Co-authored-by: Ye Chen <[email protected]>
Co-authored-by: Ania Misiorek <[email protected]>
Co-authored-by: Ania Misiorek <[email protected]>
Co-authored-by: Jacob Riddle <[email protected]>
@zliang-akamai zliang-akamai deleted the zhiwei/fix-test branch November 18, 2023 19:14
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.

3 participants