Skip to content
This repository has been archived by the owner on Sep 6, 2023. It is now read-only.

Fix test sweepers for metal projects #234

Merged
merged 5 commits into from
Jun 16, 2022

Conversation

ocobles
Copy link
Contributor

@ocobles ocobles commented Jun 15, 2022

To remove projects all other resources that belong to that project must be removed first. There was some old projects not removed with VLANs on them

Sweeper for VLANs uses VLAN description to identify which must be deleted. To make it work ,all them must have same prefix, but some had no description or they were using a random strings. Same happens with virtual circuits

In this PR all descriptions of VLAN resources, and names of virtual circuits created in tests have been modified to have tfacc prefix

fix #233

@codecov-commenter
Copy link

codecov-commenter commented Jun 15, 2022

Codecov Report

Merging #234 (3e6864f) into main (7721ae5) will increase coverage by 10.10%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             main     #234       +/-   ##
===========================================
+ Coverage   65.12%   75.22%   +10.10%     
===========================================
  Files          50       50               
  Lines        6661     6661               
===========================================
+ Hits         4338     5011      +673     
+ Misses       2163     1421      -742     
- Partials      160      229       +69     
Impacted Files Coverage Δ
metal/errors.go 63.30% <0.00%> (-4.59%) ⬇️
metal/resource_metal_reserved_ip_block.go 82.67% <0.00%> (+2.09%) ⬆️
metal/resource_metal_spot_market_request.go 57.85% <0.00%> (+3.44%) ⬆️
metal/datasource_metal_spot_market_request.go 89.69% <0.00%> (+4.12%) ⬆️
metal/datasource_metal_precreated_ip_block.go 73.78% <0.00%> (+19.41%) ⬆️
metal/utils.go 72.50% <0.00%> (+20.00%) ⬆️
metal/helpers_device.go 82.10% <0.00%> (+23.68%) ⬆️
metal/datasource_metal_device.go 89.00% <0.00%> (+25.08%) ⬆️
metal/datasource_metal_device_bgp_neighbors.go 97.65% <0.00%> (+26.56%) ⬆️
metal/resource_metal_device.go 64.55% <0.00%> (+30.51%) ⬆️
... and 5 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7721ae5...3e6864f. Read the comment docs.

Copy link
Member

@displague displague left a comment

Choose a reason for hiding this comment

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

nit: I understand shortening -project- to -pro-, but I question the addition of -pro- throughout various resource names that did not have this.

Otherwise, LGTM. The sweeper appears to be fixed in this PR and I verified with a manual script.

@ocobles
Copy link
Contributor Author

ocobles commented Jun 16, 2022

nit: I understand shortening -project- to -pro-, but I question the addition of -pro- throughout various resource names that did not have this.

Otherwise, LGTM. The sweeper appears to be fixed in this PR and I verified with a manual script.

Project' sweeper still only looks for tfacc-, but I intend to use same prefix for all projects tfacc-pro- as a naming convention which can help others to identify it as a rule, or in the future for an analysis of resources created or even define a more granular sweeper. The next part of the name must refer to the resource being tested, i.e. if test is for resource Virtual Circuit then the name of project created in that plan must be "tfacc-pro-vc-", however I just saw that not all of them were updated like this and I guess that's where the confusion comes from.

@ocobles ocobles merged commit fa9a177 into main Jun 16, 2022
@ocobles ocobles deleted the fix_test_sweepers_for_metal_projects branch June 16, 2022 08:17
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test sweepers is leaving some projects undeleted
3 participants