use of io.stackgres.common.resource.DbOpsScanner in project stackgres by ongres.
the class ClusterEventResourceTest method setup.
@BeforeAll
public static void setup() {
StackGresDbOps dbOps = new StackGresDbOps();
dbOps.setMetadata(new ObjectMeta());
dbOps.getMetadata().setNamespace("test-namespace");
dbOps.getMetadata().setName("test-operation");
dbOps.getMetadata().setUid("1");
dbOps.setSpec(new StackGresDbOpsSpec());
dbOps.getSpec().setSgCluster("test");
DbOpsScanner dbOpsScanner = Mockito.mock(DbOpsScanner.class);
Mockito.when(dbOpsScanner.getResources(ArgumentMatchers.any())).thenReturn(ImmutableList.of(dbOps));
QuarkusMock.installMockForType(dbOpsScanner, DbOpsScanner.class);
}
Aggregations