rancher / qa-tasks

List of QA Backlog
1 stars 1 forks source link

Failing Integration test flag #1484

Open igomez06 opened 1 month ago

igomez06 commented 1 month ago

Come up with a flag, that will allow us to skip integration tests, but also run them ad hoc at release time so we don't lose test coverage while the bug is being fixed. That way we can get around the Skip flag, without having to modify code to run it.

caliskanugur commented 1 month ago

The current version of freeform supports this ../integration/steveapi

bmdepesa commented 2 weeks ago

Ripping from slack --

My only issue with this is the "unreadability" of that blurb

if r.client.Flags.GetValue(environmentflag.Quarantined) {
    t.Skip()
}

is less clear than // @Quarantine

In my perfect world, we'd have some pretest method (beforeAll() junit equivalent) where we only have to write that once and not in every test, and then just annotate the test. A compromise might be:

func QUARANTINED_TEST(*Testing t, *Client r) {
  if r.client.Flags.GetValue(environmentflag.Quarantined) {
    t.Skip()
}

and then

testBlah() {
  QUARANTINED_TEST(t, r)

  ... test logic ...
}