Added metadata and dhcp_lease tests

Ported those tests and added the extra logic to the builder.