You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a Finalizer to the Link controller. For now, this just handles deleting the hcp-config directory.
Testing & Reproduction steps
In addition to automated unit tests, I performed the following manual test.
Run consul like so:
go run . agent -dev --log-level trace --data-dir /tmp/consul-test
Verify that hcp-config directory is created
➜ consul git:(nickcellino/CC-7338/add-link-finalizer) ls /tmp/consul-test
checkpoint-signature hcp-config node-id serf
➜ consul git:(nickcellino/CC-7338/add-link-finalizer) ls /tmp/consul-test/hcp-config
hcp-management-token server-config.json successful-bootstrap
➜ consul git:(nickcellino/CC-7338/add-link-finalizer)
Verify that hcp-config directory no longer exists ✅
➜ consul git:(nickcellino/CC-7338/add-link-finalizer) ls /tmp/consul-test
checkpoint-signature node-id serf
Verify that Link no longer exists:
➜ consul git:(nickcellino/CC-7338/add-link-finalizer) http GET localhost:8500/api/hcp/v2/link/global
HTTP/1.1 404 Not Found
Content-Length: 52
Content-Type: text/plain; charset=utf-8
Date: Tue, 23 Jan 2024 21:34:14 GMT
rpc error: code = NotFound desc = resource not found
Description
This adds a
Finalizer
to the Link controller. For now, this just handles deleting thehcp-config
directory.Testing & Reproduction steps
In addition to automated unit tests, I performed the following manual test.
hcp-config
directory is createdVerify from logs that finalizer has been added ✅ :
Verify from logs that cleanup has been called ✅ :
hcp-config
directory no longer exists ✅Links
https://hashicorp.atlassian.net/browse/CC-7338
PR Checklist
The text was updated successfully, but these errors were encountered: