Skip to content

Commit

Permalink
updating test-cel
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Choo <achoo30@bloomberg.net>
  • Loading branch information
aabchoo committed Dec 12, 2024
1 parent c625ebe commit e200702
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
7 changes: 5 additions & 2 deletions api/v1alpha1/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,14 @@ const (
// +kubebuilder:object:root=true

// LLMProviderPolicy specifies the provider specific configuration.
//
// This is a provider specific-configuration, e.g.AWS Bedrock, Azure etc.
type LLMProviderPolicy struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec LLMProviderPolicySpec `json:"spec,omitempty"`
}

// LLMProviderPolicySpec specifies a provider (e.g.AWS Bedrock, Azure etc.) specific-configuration like auth
type LLMProviderPolicySpec struct {
// BackendRefs lists the LLMBackends that this provider policy will apply
// The namespace is "local", i.e. the same namespace as the LLMRoute.
//
Expand Down
2 changes: 1 addition & 1 deletion tests/cel-validation/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func TestLLMProviderPolicy(t *testing.T) {
data, err := tests.ReadFile(path.Join("testdata/llmproviderpolicy", tc.name))
require.NoError(t, err)

llmRoute := &aigv1a1.LLMRoute{}
llmRoute := &aigv1a1.LLMProviderPolicy{}
err = yaml.UnmarshalStrict(data, llmRoute)
require.NoError(t, err)

Expand Down
3 changes: 2 additions & 1 deletion tests/cel-validation/testdata/llmproviderpolicy/basic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: LLMProviderPolicy
metadata:
name: dog-provider-policy
namespace: default
type: AWSBedrock
spec:
type: AWSBedrock
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ kind: LLMProviderPolicy
metadata:
name: dog-provider-policy
namespace: default
type: UnknownType
spec:
type: UnknownType

0 comments on commit e200702

Please sign in to comment.