@Test public void missingFromTable() { AkibanInformationSchema ais = build(); Table t = ais.getTable("test", "t"); t.setUuid(null); t.getColumn("id").setUuid(UUID.randomUUID()); assertEquals("failures", 1, validate(ais).size()); }
@Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table t : ais.getTables().values()) { if(t.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingTable(t))); } for(Column c: t.getColumnsIncludingInternal()) { if(c.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingColumn(t, c))); } } } }
UUIDPresent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table t : ais.getTables().values()) { if(t.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingTable(t))); } for(Column c: t.getColumnsIncludingInternal()) { if(c.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingColumn(t, c))); } } } } }
UUIDPresent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table t : ais.getTables().values()) { if(t.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingTable(t))); } for(Column c: t.getColumnsIncludingInternal()) { if(c.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingColumn(t, c))); } } } }  }
UUIDPresent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table t : ais.getTables().values()) { if(t.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingTable(t))); } for(Column c: t.getColumnsIncludingInternal()) { if(c.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingColumn(t, c))); } } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output); }
UUIDPresent implements AISValidation { @Override public void validate(AkibanInformationSchema ais, AISValidationOutput output) { for(Table t : ais.getTables().values()) { if(t.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingTable(t))); } for(Column c: t.getColumnsIncludingInternal()) { if(c.getUuid() == null) { output.reportFailure(new AISValidationFailure(missingColumn(t, c))); } } } }  @Override void validate(AkibanInformationSchema ais, AISValidationOutput output);  }