paraglider-project / paraglider

Streamlining cloud networking
https://paragliderproject.io
Apache License 2.0
61 stars 4 forks source link

[AWS] Resource creation for VM #454

Closed seankimkdy closed 2 months ago

seankimkdy commented 3 months ago

Resolves #453. Some unique things/limitations about AWS

Faking AWS Server for Unit Testing Unlike GCP and Azure, faking an HTTP server did not work. I used middlewares instead which is a bit of a different concept. fakeDeserializeMiddleware should look a lot like getFakeServerHandler in GCP or Azure.

Using Namespaces for Resource Cleanup during Integration Test AWS does not have resource groups in the sense that Azure does, nor does it have a nice isolation mechanism like GCP project does. There's no clean way to delete resources by a group, so I had to write a custom deletion by hand in TeardownAwsTesting. This is also why namespace has to be unique as there can be many different tests going on in the same account for AWS.

VPC Quota Limit There's currently a limit of default 5 VPCs per region in AWS. This will not do as we tend to have more >5 ongoing PRs. We should ask for an service quota increase.

github-actions[bot] commented 3 months ago

Unit Test Results

321 tests  +5   321 :white_check_mark: +5   4s :stopwatch: +2s  50 suites +1     0 :zzz: ±0    1 files   ±0     0 :x: ±0 

Results for commit 7f081c14. ± Comparison against base commit ddba24eb.

This pull request removes 2 and adds 7 tests. Note that renamed tests count towards both. ``` github.com/paraglider-project/paraglider/pkg/ibm ‑ TestCreateResourceExistingVPCSubnet github.com/paraglider-project/paraglider/pkg/ibm ‑ TestCreateResourceNewVPC ``` ``` github.com/paraglider-project/paraglider/pkg/aws ‑ TestCreateResource github.com/paraglider-project/paraglider/pkg/aws ‑ TestCreateResource/ExistingNetwork github.com/paraglider-project/paraglider/pkg/aws ‑ TestCreateResource/FromScratch github.com/paraglider-project/paraglider/pkg/aws ‑ TestCreateResource/WrongAvailabilityZone github.com/paraglider-project/paraglider/pkg/ibm ‑ TestCreateResourceEndpointGatewayNewVPC github.com/paraglider-project/paraglider/pkg/ibm ‑ TestCreateResourceInstanceExistingVPCSubnet github.com/paraglider-project/paraglider/pkg/ibm ‑ TestCreateResourceInstanceNewVPC ```

:recycle: This comment has been updated with latest results.

github-actions[bot] commented 3 months ago

51.8

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

The coverage result does not include the functional test results.

github-actions[bot] commented 3 months ago

51.8

For the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

The coverage result does not include the functional test results.