Random failures in core

There seem to be random failures in core:


unexpected invocation: #<AnyInstance:SmartProxy(id: integer, name: string, url: string, created_at: datetime, updated_at: datetime, expired_logs: string)>.statuses()

Initially I thought these were caused by incorrect Rails cache handling in tests, but it looks like we clear cache correctly.

Looks familiar?

Can it be yet another use case where we stub methods outside test scope?

It’s just a wild guess, but worth investigating.

Been there, haven’t found any suspicious code.

I suspect


in combination with


I am trying to move some stubs to different level:


But I am shooting in the dark, I’d appreciate someone taking another look I’ve already spent 2 days with this.