datacatalog_get_entry.test.yaml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. test:
  2. suites:
  3. - name: Data Catalog v1beta1 Get Entry sample tests
  4. setup:
  5. - call:
  6. sample: datacatalog_lookup_entry
  7. params:
  8. resource_name:
  9. literal: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom
  10. - extract_match:
  11. pattern: projects/([\w-]+)
  12. variable: project_id
  13. - extract_match:
  14. pattern: locations/([\w-]+)
  15. variable: location_id
  16. - extract_match:
  17. pattern: entryGroups/(@[\w-]+|[\w-]+)
  18. variable: entry_group_id
  19. - extract_match:
  20. pattern: entries/([\w-]+)
  21. variable: entry_id
  22. cases:
  23. - name: Get Entry for a public BigQuery Table
  24. spec:
  25. - call:
  26. sample: datacatalog_get_entry
  27. params:
  28. project_id:
  29. variable: project_id
  30. location_id:
  31. variable: location_id
  32. entry_group_id:
  33. variable: entry_group_id
  34. entry_id:
  35. variable: entry_id
  36. - assert_contains:
  37. - literal: "Entry name: projects/bigquery-public-data"
  38. - literal: "Entry type: TABLE"
  39. - literal: "Linked resource: //bigquery.googleapis.com/projects/bigquery-public-data/datasets/new_york_taxi_trips/tables/taxi_zone_geom"