Skip to content

Commit

Permalink
chore: fix another flake
Browse files Browse the repository at this point in the history
in case the account or secret could not be created, we show a generic error.
if the account could be created but the secret creation fails with a 404, we get
a more specific error (which we don't want here!).

now we always fail with the account creation right away.

the test was failing for good reason - i wonder how that can be a flake.
i suspect the nested beforeEach-blocks that override each others routes may be
troublesome and "broke" because of the recent cypress update. i saw a note about
fixtures now being loaded async. maybe that effects the order in which the
route-calls register. last one wins :/
  • Loading branch information
pierrebeitz committed Aug 19, 2020
1 parent 1b902bf commit 8908a11
Showing 1 changed file with 0 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,27 +88,13 @@ describe("Service Accounts", () => {
mesos: "1-task-healthy",
plugins: "organization",
});

cy.route(
"DELETE",
/acs\/api\/v1\/users\/myserviceaccount(\?_timestamp=[0-9]+)?$/,
""
);

cy.route(
"PUT",
/acs\/api\/v1\/users\/myserviceaccount(\?_timestamp=[0-9]+)?$/,
""
);
});

it("Shows unanchored errors for unknown secret errors", () => {
cy.visitUrl({ url: "/organization/service-accounts" });

cy.get("button.button-primary-link").click();

cy.get('.form-control[name="uid"]').type("myserviceaccount");

cy.get(".modal-footer button.button-primary")
.contains("Create")
.click();
Expand Down

0 comments on commit 8908a11

Please sign in to comment.