Skip to content

Latest commit

 

History

History
111 lines (91 loc) · 3.96 KB

File metadata and controls

111 lines (91 loc) · 3.96 KB

Certsuite + Test Bundle Workflow

Full Workflow

flowchart TD
    Start([Script Start]) --> ParseInputs[Parse inputs: operators list, catalog, config]
    ParseInputs --> CreateCatalog[Create OLM CatalogSource]
    CreateCatalog --> WaitCatalog[Wait for all packages available]
    WaitCatalog --> CloneBundles

    subgraph init ["Initialization"]
        CloneBundles{TEST_BUNDLE_SOURCE?}
        CloneBundles -->|centralized| CloneRepo[git clone TestConfigurationBundle repo]
        CloneBundles -->|packagemanifest| FutureSource["Future: discover from packagemanifest"]
        CloneRepo -->|success| BundleReady[TEST_BUNDLE_DIR set]
        CloneRepo -->|failure| NoBundles[TEST_BUNDLE_DIR empty - skip operand installs]
    end

    BundleReady --> OperatorLoop
    NoBundles --> OperatorLoop

    subgraph OperatorLoop ["For Each Operator"]
        direction TB
        CreateSub[Create Subscription + OperatorGroup] --> WaitCSV[Wait for CSV to succeed]
        WaitCSV -->|timeout| ReportFail1[Report failure, continue]
        WaitCSV -->|success| MCECheck

        subgraph mce ["Hardcoded Block (preserved)"]
            MCECheck{multicluster-engine?}
            MCECheck -->|yes| MCEInstall[Apply MultiClusterHub CR]
            MCECheck -->|no| SkipMCE[Skip]
        end

        MCEInstall --> GenericInstall
        SkipMCE --> GenericInstall

        subgraph bundle ["Generic Operand Install"]
            GenericInstall[get_bundle_dir] --> BundleFound{Bundle exists?}
            BundleFound -->|no| SkipOperand[Log: no bundle, skip]
            BundleFound -->|yes| LookupBundle[Read operator-map.yaml]
            LookupBundle --> CheckPrereqs{00-prerequisites.yaml?}
            CheckPrereqs -->|yes| ApplyPrereqs[oc apply -f 00-prerequisites.yaml]
            CheckPrereqs -->|no| ApplyCRs
            ApplyPrereqs -->|fail| ReportFail2[Report failure, continue]
            ApplyPrereqs -->|success| ApplyCRs
            ApplyCRs[oc apply -f 01-operand-crs.yaml] -->|fail| ReportFail2
            ApplyCRs -->|success| Validate
            Validate{02-validate.sh exists?}
            Validate -->|yes| RunValidate["Run 02-validate.sh (with timeout)"]
            Validate -->|no| OperandReady
            RunValidate -->|pass| OperandReady[Operand ready]
            RunValidate -->|fail| ReportFail2
        end

        SkipOperand --> RunTests
        OperandReady --> RunTests

        RunTests[Run certsuite certification tests] --> Teardown

        subgraph cleanup ["Cleanup"]
            Teardown[teardown_operands: oc delete -f teardown.yaml] --> UninstallOp[Uninstall operator + delete namespace]
        end
    end

    ReportFail1 --> NextOp{More operators?}
    ReportFail2 --> NextOp
    UninstallOp --> NextOp
    NextOp -->|yes| CreateSub
    NextOp -->|no| DeleteCatalog

    DeleteCatalog[Delete CatalogSource] --> CleanupTemp[Remove TEST_BUNDLE_DIR]
    CleanupTemp --> GenerateReport[Generate HTML report]
    GenerateReport --> Done([Done])
Loading

Bundle Resolution

flowchart LR
    subgraph current ["Current: Centralized"]
        A1[operator name] --> A2[operator-map.yaml]
        A2 --> A3["bundles/<operator>/"]
    end

    subgraph future ["Future: Package Manifest"]
        B1[operator name] --> B2[oc get packagemanifest]
        B2 --> B3[Discover operator repo URL]
        B3 --> B4[Clone operator repo]
        B4 --> B5["test/certification/"]
    end

    Switch{TEST_BUNDLE_SOURCE} -->|centralized| A1
    Switch -->|packagemanifest| B1
Loading

Bundle File Execution Order

flowchart LR
    P["00-prerequisites.yaml<br/>(optional)"] --> C["01-operand-crs.yaml<br/>(default CR active,<br/>others commented out)"]
    C --> V["02-validate.sh<br/>(poll until healthy)"]
    V --> T["Run Tests"]
    T --> D["teardown.yaml<br/>(cleanup CRs)"]

    style P fill:#f0f0f0,stroke:#999
    style C fill:#d4edda,stroke:#28a745
    style V fill:#cce5ff,stroke:#0066cc
    style T fill:#fff3cd,stroke:#856404
    style D fill:#f8d7da,stroke:#dc3545
Loading