Port recent changes to test script from 2.0-exposed