Fix integration tests

Gradually fixing the integration tests so they at all run without error.  This is the first batch of fixes.