Uploaded image for project: 'OpenShift GitOps'
  1. OpenShift GitOps
  2. GITOPS-2478

Label all current tests for GitOps E2E

    XMLWordPrintable

Details

    • Story
    • Resolution: Done
    • Undefined
    • None
    • None
    • None
    • 5
    • False
    • None
    • False
    • +
    • GITOPS Sprint 229, GITOPS Sprint 230, GITOPS Sprint 231

    Description

      Background

      As part of Epic GITOPS-2470 we need first to identify which tests we have in the operator-e2e repository for gitops-operator, and then apply the corresponding labels according to the part or component that they test:

      • argocd
      • console
      • dex
      • kam
      • applicationset
        ...

      Approach

      We will rename each of the subfolders for the tests, including the component or components that are testing in alphabetical order between underscores, after the first numeric block, and before the test name/description.

      Criteria

      For labeling, every folder is renamed with three blocks, separated by an underscore "_":

      1. First block: Compound by two blocks of integers separated by a hyphen:
        • Format: X-YYY
      2. Second block: It has a hyphen-separated ("kebab-case") list of components the test is related to:
        • Format: comp1comp2[...]
        • It can include component or scope:
          1. Component: 
            • argocd
            • console
            • kam
            • dex
            • ...
          2. Scope:
            • auth: tests related to RBAC, permissions...
            • logging: tests related to logs, notifications, alerts...
            • infra: infrastructure validations like networking, cluster nodes, scaling, affinity...
            • meta: corresponding checks to metadata, labels, tags, annotations...
      3. Third block: It has the name of the test, which is a brief description separated by hyphens :
        • Format: test-name-or-description

      Examples:

      before labeling:
          1-008_validate-custom-argocd-namespace
      after labeling:
          1-008{}argocd{}validate-custom-argocd-namespace

      before:
          1-078_validate_default_argocd_consoleLink
      after:
          1-078{}argocd-console{}validate-default-argocd-consoleLink

      Convention motivation:  

      The reasons why this convention has been chosen:

      1. We don't modify the current naming (except for the "kebab-case" in the third block), instead, we add information in between.
      2. Keeping the numeric (first) block allow us to have an additional filtering layer (for instance, using odd numbers for sequential tests, and even for parallel ones).
      3. The selected characters are literal characters in REGEX, avoiding using special characters (., +, {}, {}?, {}^, {}$, {}(), {}[], {}{}, {}|, {}{*}). This has the below benefits:
        1. You can easily access a "block" by using the underscore "_" as a field separator.
        2. Is easy to split the second (components) block by using the hyphen "-" as a field separator (the semicolon ";" could be problematic in most Unix-like shells).
        3. We just use two literal characters ("_" and "-") to split and manipulate all information. Even a simple tool like "cut" can manage this.
        4. Don't need to escape special characters in almost any language.

      Acceptance Criteria

      • A new branch in operator-e2e forked from master, where all tests have been labeled (renamed) with their respective parts or components.
      • New MR to request validation from the rest of the QE team.

      Attachments

        Activity

          People

            bluengop@redhat.com Borja Luengo (Inactive)
            bluengop@redhat.com Borja Luengo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 2 days
                2d
                Remaining:
                Remaining Estimate - 2 days
                2d
                Logged:
                Time Spent - Not Specified
                Not Specified