Skip to content

Commit

Permalink
test: fix skeleton test for Vertex AI resources
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyih committed Jul 6, 2024
1 parent 2866fe7 commit a591ff0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
4 changes: 2 additions & 2 deletions config/servicemappings/vertexai.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ spec:
- name: google_vertex_ai_endpoint
kind: VertexAIEndpoint
idTemplate: "projects/{{project}}/locations/{{region}}/endpoints/{{name}}"
idTemplateCanBeUsedToMatchResourceName: false
idTemplateCanBeUsedToMatchResourceName: true
resourceAvailableInAssetInventory: true
v1alpha1ToV1beta1: true
storageVersion: v1alpha1
Expand Down Expand Up @@ -116,7 +116,7 @@ spec:
- name: google_vertex_ai_index
kind: VertexAIIndex
idTemplate: "projects/{{project}}/locations/{{region}}/indexes/{{name}}"
idTemplateCanBeUsedToMatchResourceName: false
idTemplateCanBeUsedToMatchResourceName: true
resourceAvailableInAssetInventory: false
v1alpha1ToV1beta1: true
storageVersion: v1alpha1
Expand Down
24 changes: 10 additions & 14 deletions pkg/resourceskeleton/testdata/uri-skeleton.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1111,34 +1111,30 @@
location: us-central1
ResourceConfigId: EdgeContainerVpnConnection
URI: "https://edgecontainer.googleapis.com/v1/projects/kcc-test/locations/us-central1/vpnConnections/edgecontainervpnconnection-test"
- ExpectedSkeleton:
apiVersion: vertexai.cnrm.cloud.google.com/v1beta1
kind: VertexAIDataset
spec:
projectRef:
external: kcc-test
location: us-central1
- ExpectedSkeleton: null # VertexAIDataset does not support import
ResourceConfigId: VertexAIDataset
URI: "https://us-central1-aiplatform.googleapis.com/v1beta1/projects/kcc-test/locations/us-central1/datasets/1234567890?alt=json"
URI: ""
- ExpectedSkeleton:
apiVersion: vertexai.cnrm.cloud.google.com/v1beta1
kind: VertexAIEndpoint
metadata:
name: vertexaiendpoint-test
spec:
projectRef:
external: kcc-test
region: us-central1
external: kcc-test
region: us-central1
ResourceConfigId: VertexAIEndpoint
URI: "https://us-central1-aiplatform.googleapis.com/v1beta1/projects/kcc-test/locations/us-central1/endpoints/vertexaiendpoint-test"
- ExpectedSkeleton:
apiVersion: vertexai.cnrm.cloud.google.com/v1beta1
kind: VertexAIIndex
metadata:
name: vertexaiindex-test
metadata: {}
spec:
projectRef:
external: kcc-test
region: us-central1
external: kcc-test
region: us-central1
status:
observedState:
name: vertexaiindex-test
ResourceConfigId: VertexAIIndex
URI: "https://us-central1-aiplatform.googleapis.com/v1beta1/projects/kcc-test/locations/us-central1/indexes/vertexaiindex-test"

0 comments on commit a591ff0

Please sign in to comment.