Cisco NX-OS - Check serializability of VS configs in tests
@@ -54,6 +54,7 @@ import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.ParametersAreNonnullByDefault;
import org.antlr.v4.runtime.ParserRuleContext;
+import org.apache.commons.lang3.SerializationUtils;
import org.batfish.common.BatfishLogger;
import org.batfish.common.Warnings;
import org.batfish.common.bdd.BDDPacket;
@@ -157,6 +158,8 @@ public final class CiscoNxosGrammarTest {
CiscoNxosConfiguration vendorConfiguration =
(CiscoNxosConfiguration) extractor.getVendorConfiguration();
vendorConfiguration.setFilename(TESTCONFIGS_PREFIX + hostname);
+ // crash if not serializable
+ SerializationUtils.clone(vendorConfiguration);
return vendorConfiguration;
}
