test: cleanup around errors