Skip to content

[TEST] Validate longhorn UI access once the chart is installed on a downstream rancher cluster #494

@slickwarren

Description

@slickwarren

test spec:

  • find the longhorn deployment in the downstream cluster, and check that all pods in its namespace are in an active state
  • check the services associated with the longhorn deployment, and check that the service is accessible and gives a valid http response
    • clusterIP are only accessible via the proxy through kubernetes
    • nodeports are available on any node in the cluster at the specified port
    • loadbalancers are typically not used for longhorn deployments in our tests
  • using the longhorn api and the URL from the previous step that points to the longhorn service, validate the following:
    • longhorn volumes are in a valid, usable state
      • create a longhorn volume through longhorn's api.
        • Check that the volume comes to an active state through both longhorn api and rancher api
        • rancher api should show a volume attached, using the longhorn storageclass even though the volume was created directly through longhorn
    • nodes in longhorn show a valid state
    • settings are set properly

for a longhorn deployment with all default values, you can find the api on the downstream cluster at a link like this:
https://<rancher_host>/k8s/clusters/<rancher_downstream_cluster_id>/api/v1/namespaces/longhorn-system/services/http:longhorn-frontend:80/proxy/v1
here is a link to the github repo for longhorn: https://github.com/longhorn/longhorn

Please write tests for this using the validation/longhorn folder. You can find helper functions under the interoperability/longhorn folder. Any missing functions that need to be used can be added to the interoperability/longhorn folder, and are allowed to use external apis from the longhorn github repo mentioned above in addition to the rancher api that is normally used.

below are the equivalent UI tests. Do not create tests for the UI, these are only for reference to the above backend test cases.

  • title: "Longhorn UI Access Through Rancher"
    description: "Verify seamless access to Longhorn UI through Rancher interface with proper authentication and session management."
    automation: 0
    steps:
    • action: "Navigate to cluster view in Rancher dashboard"
      data: ""
      expectedresult: "Cluster overview displays"
      position: 1
    • action: "Verify 'Longhorn' appears in left navigation menu"
      data: ""
      expectedresult: "Longhorn menu item is visible"
      position: 2
    • action: "Click 'Longhorn' menu item"
      data: ""
      expectedresult: "Longhorn resources display in Rancher"
      position: 3
    • action: "Click the 'Longhorn' button in the Overview section"
      data: ""
      expectedresult: "Longhorn UI opens in new tab/window"
      position: 4
    • action: "Navigate to 'Volume' section in Longhorn UI"
      data: ""
      expectedresult: "Volume management page loads"
      position: 5
    • action: "Navigate to 'Node' section in Longhorn UI"
      data: ""
      expectedresult: "Node management page loads"
      position: 6
    • action: "Navigate to 'Setting' section in Longhorn UI"
      data: ""
      expectedresult: "Settings page loads"
      position: 7
    • action: "Return to Rancher tab and verify session maintained"
      data: ""
      expectedresult: "Rancher session still active"
      position: 8
    • action: "Create test volume from Longhorn UI"
      data: ""
      expectedresult: "Volume creation succeeds"
      position: 9
    • action: "Return to Rancher and verify volume appears"
      data: ""
      expectedresult: "Volume visible in Rancher Longhorn section"
      position: 10

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions