Commit Graph

4 Commits (014f1a058ff28dd208255004f1470481477d6471)

Author SHA1 Message Date
Brad Davidson 014f1a058f Add tests for supervisor request handlers
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit f345697c0a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson a3d768a7de Replace *core.Factory with CoreFactory interface
Make this field an interface instead of pointer to allow mocking. Not sure why wrangler has a type that returns an interface instead of just making it an interface itself. Wrangler in general is hard to mock for testing.

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit e6327652f0)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson 31ac700bc9 Move additional core/v1 mocks into tests package
Convert nodepassword tests to use shared mocks

Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit c20c06373a)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00
Brad Davidson 6c236d061f Move core/v1 mock into tests package for reuse
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
(cherry picked from commit 8f8cfb56b5)
Signed-off-by: Brad Davidson <brad.davidson@rancher.com>
2025-01-10 16:11:04 -08:00