Skip to content

Commit

Permalink
test: Update Dekaf tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jshearer committed Sep 30, 2024
1 parent 41e60b8 commit 6009e38
Show file tree
Hide file tree
Showing 5 changed files with 126 additions and 1,591 deletions.
88 changes: 41 additions & 47 deletions crates/validation/tests/scenario_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,20 @@ fn test_golden_all_visits() {
fn test_dekaf_materialization_inline_config() {
let fixture = r##"
test://example/catalog.yaml:
collections:
testing/schema_with_properties:
schema:
type: object
properties:
id: { type: string }
required: [id]
key: [/id]
materializations:
testing/test_dekaf:
good:
endpoint:
dekaf: {}
bindings:
- source: testing/schema_with_properties
resource: {}
dekaf: &config
variant: foo
config:
strict_topic_names: false
bindings: []
driver:
materializations:
good: &connector
connectorType: DEKAF
config: *config
bindings: []
dataPlanes:
"1d:1d:1d:1d:1d:1d:1d:1d":
default: true
Expand All @@ -41,24 +39,22 @@ driver:
#[test]
fn test_dekaf_materialization_indirect_config() {
let fixture = r##"
test://example/dekaf.yaml: {}
test://example/catalog.yaml:
collections:
testing/schema_with_properties:
schema:
type: object
properties:
id: { type: string }
required: [id]
key: [/id]
materializations:
testing/test_dekaf:
good:
endpoint:
dekaf: example/dekaf.yaml
bindings:
- source: testing/schema_with_properties
resource: {}
dekaf: &config
variant: foo
config: test://example/dekaf
bindings: []
test://example/dekaf:
strict_topic_names: false
driver:
materializations:
good: &connector
connectorType: DEKAF
config: *config
bindings: []
dataPlanes:
"1d:1d:1d:1d:1d:1d:1d:1d":
default: true
Expand All @@ -72,7 +68,6 @@ driver:
#[test]
fn test_dekaf_materialization_invalid() {
let fixture = r##"
test://example/dekaf.yaml: {}
test://example/catalog.yaml:
collections:
testing/schema_with_properties:
Expand All @@ -83,13 +78,16 @@ test://example/catalog.yaml:
required: [id]
key: [/id]
materializations:
testing/test_dekaf:
endpoint:
bad:
endpoint: &config
dekaf: false
bindings:
- source: testing/schema_with_properties
resource: {}
bindings: []
driver:
materializations:
bad: &connector
connectorType: DEKAF
config: *config
bindings: []
dataPlanes:
"1d:1d:1d:1d:1d:1d:1d:1d":
default: true
Expand All @@ -103,24 +101,20 @@ driver:
#[test]
fn test_dekaf_materialization_nonexistent() {
let fixture = r##"
test://example/dekaf.yaml: {}
test://example/catalog.yaml:
collections:
testing/schema_with_properties:
schema:
type: object
properties:
id: { type: string }
required: [id]
key: [/id]
materializations:
testing/test_dekaf:
bad:
endpoint:
dekaf: foo/bar
bindings:
- source: testing/schema_with_properties
resource: {}
dekaf: &config
variant: bar
config: foo/bar
bindings: []
driver:
materializations:
good: &connector
connectorType: DEKAF
config: *config
bindings: []
dataPlanes:
"1d:1d:1d:1d:1d:1d:1d:1d":
default: true
Expand Down
Loading

0 comments on commit 6009e38

Please sign in to comment.