Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/e2e/controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ var (
componentApi.ModelMeshServingComponentName: modelMeshServingTestSuite,
componentApi.ModelControllerComponentName: modelControllerTestSuite,
componentApi.FeastOperatorComponentName: feastOperatorTestSuite,
componentApi.LlamaStackOperatorComponentName: llamastackOperatorTestSuite,
},
}

Expand Down
41 changes: 41 additions & 0 deletions tests/e2e/llamastackoperator_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package e2e_test

import (
"testing"

"github.com/stretchr/testify/require"

componentApi "github.com/opendatahub-io/opendatahub-operator/v2/api/components/v1alpha1"
)

type LlamaStackOperatorTestCtx struct {
*ComponentTestCtx
}

func llamastackOperatorTestSuite(t *testing.T) {
t.Helper()

ct, err := NewComponentTestCtx(t, &componentApi.LlamaStackOperator{})
require.NoError(t, err)

componentCtx := LlamaStackOperatorTestCtx{
ComponentTestCtx: ct,
}

// Define test cases.
testCases := []TestCase{
{"Validate component enabled", componentCtx.ValidateComponentEnabled},
{"Validate operands have OwnerReferences", componentCtx.ValidateOperandsOwnerReferences},
{"Validate update operand resources", componentCtx.ValidateUpdateDeploymentsResources},
{"Validate component releases", componentCtx.ValidateComponentReleases},
{"Validate deployment deletion recovery", componentCtx.ValidateDeploymentDeletionRecovery},
{"Validate configmap deletion recovery", componentCtx.ValidateConfigMapDeletionRecovery},
{"Validate service deletion recovery", componentCtx.ValidateServiceDeletionRecovery},
{"Validate serviceaccount deletion recovery", componentCtx.ValidateServiceAccountDeletionRecovery},
{"Validate rbac deletion recovery", componentCtx.ValidateRBACDeletionRecovery},
{"Validate component disabled", componentCtx.ValidateComponentDisabled},
}

// Run the test suite.
RunTestCases(t, testCases)
}