message: handle 409s during fixture creation
  And also stop preemptively doing a teardown at the start of each test suite, which is usually not needed and can be handled by the 409 code when it is needed.
diff: @@ -10,10 +10,7 @@ export default class Fixtures {
  }
  setupTest(hooks) {
  - hooks.beforeEach(async () => {
  - await this.teardown();
  - await this.setup();
  - });
  + hooks.beforeEach(async () => await this.setup());
  hooks.afterEach(async () => await this.teardown());
  }
  @@ -28,8 +25,20 @@ export default class Fixtures {
  let models = this._factory.getModels();
  for (let [, model] of models.entries()) {
  + let response = await this._createModel(model);
  + if (response.status === 409) {
  + await this._fetchAndDelete(model);
  + response = await this._createModel(model);
  + }
  + if (response.status !== 201) {
  + throw new Error(`Unexpected response ${response.status} while trying to define fixtures: ${await response.text()}`);
  + }
  + }
  + }
  +
  + async _createModel(model) {
  let url = `${hubURL}/api/${encodeURIComponent(model.type)}`;
  - let response = await fetch(url, {
  + return await fetch(url, {
  method: 'POST',
  headers: {
  authorization: `Bearer ${ciSessionId}`,
  @@ -44,10 +53,6 @@ export default class Fixtures {
  }
  })
  });
  - if (response.status !== 201) {
  - throw new Error(`Unexpected response ${response.status} while trying to define fixtures: ${await response.text()}`);
  - }
  - }
  }
  async teardown() {
  @@ -67,7 +72,9 @@ export default class Fixtures {
  if (!item.type) { continue; }
  if (item.id) {
  - let response = await fetch(`${hubURL}/api/${encodeURIComponent(item.type)}/${encodeURIComponent(item.id)}`, {
  + await this._fetchAndDelete(item);
  + } else {
  + let response = await fetch(`${hubURL}/api/${encodeURIComponent(item.type)}`, {
  method: 'GET',
  headers: {
  authorization: `Bearer ${ciSessionId}`,
  @@ -77,10 +84,16 @@ export default class Fixtures {
  if (response.status !== 200) { continue; }
  - let { data:model } = await response.json();
  + let { data:models } = await response.json();
  + for (let model of models) {
  await this._deleteModel(model);
  - } else {
  - let response = await fetch(`${hubURL}/api/${encodeURIComponent(item.type)}`, {
  + }
  + }
  + }
  + }
  +
  + async _fetchAndDelete(item) {
  + let response = await fetch(`${hubURL}/api/${encodeURIComponent(item.type)}/${encodeURIComponent(item.id)}`, {
  method: 'GET',
  headers: {
  authorization: `Bearer ${ciSessionId}`,
  @@ -88,15 +101,11 @@ export default class Fixtures {
  }
  });
  - if (response.status !== 200) { continue; }
  -
  - let { data:models } = await response.json();
  - for (let model of models) {
  + if (response.status === 200) {
  + let { data:model } = await response.json();
  await this._deleteModel(model);
  }
  }
  - }
  - }
  async _deleteModel(model) {
  if (model.type === 'user-realms') { return; }
  