mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-09-24 03:50:19 +00:00
test(agentcompat): add integration scenarios
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
//go:build linux
|
||||
|
||||
package scenario
|
||||
|
||||
import "context"
|
||||
|
||||
type heldLegacyFMCapabilityCleanup struct {
|
||||
Unregister func(context.Context) error
|
||||
Absence func(context.Context) error
|
||||
Cancel func(context.Context) error
|
||||
}
|
||||
|
||||
func pushHeldLegacyFMCapabilityCleanup(stack *heldCleanupStack, cleanup heldLegacyFMCapabilityCleanup) error {
|
||||
if err := stack.Push(heldCleanupAction{name: "unregister FM capability", cleanup: cleanup.Unregister}); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := stack.Push(heldCleanupAction{name: "restore FM IOStream baseline and absence", cleanup: cleanup.Absence}); err != nil {
|
||||
return err
|
||||
}
|
||||
return stack.Push(heldCleanupAction{name: "cancel FM capability", cleanup: cleanup.Cancel})
|
||||
}
|
||||
Reference in New Issue
Block a user