Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Acceptance tests #200

Merged
merged 12 commits into from
Jun 14, 2023
Merged

Acceptance tests #200

merged 12 commits into from
Jun 14, 2023

Conversation

bobbyiliev
Copy link
Contributor

@bobbyiliev bobbyiliev commented Jun 13, 2023

Adding more acceptance tests for the following resources:

  • Views
  • Tables
  • Types
  • Schemas
  • Load generator source
  • Sink Kafka
  • Source Kafka
  • Source Postgres

@bobbyiliev bobbyiliev requested a review from dehume June 13, 2023 15:18
Copy link
Contributor

@dehume dehume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good. Only thing is some of these resources have additional attributes we can check in state after the apply.

Config: testAccSchemaResource(schemaName),
Check: resource.ComposeTestCheckFunc(
testAccCheckSchemaExists("materialize_schema.test"),
resource.TestCheckResourceAttr("materialize_schema.test", "name", schemaName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple more attributes to include database_name and qualified_sql_name

Config: testAccSourceLoadGeneratorResource(sourceLoadGeneratorName),
Check: resource.ComposeTestCheckFunc(
testAccCheckSourceLoadGeneratorExists("materialize_source_load_generator.test"),
resource.TestCheckResourceAttr("materialize_source_load_generator.test", "name", sourceLoadGeneratorName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other attributes we should track like the schema_name, database_name, qualified_sql_name, size, load_generator_type and the counter_options

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goot catch! Just added the missing attributes for all of those resources! Let me know if you notice any other issues!

Config: testAccTableResource(tableName),
Check: resource.ComposeTestCheckFunc(
testAccCheckTableExists("materialize_table.test"),
resource.TestCheckResourceAttr("materialize_table.test", "name", tableName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other attributes we should track like the schema_name, database_name, qualified_sql_name, column

Config: testAccTypeResource(typeName),
Check: resource.ComposeTestCheckFunc(
testAccCheckTypeExists("materialize_type.test"),
resource.TestCheckResourceAttr("materialize_type.test", "name", typeName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other attributes we should track like the schema_name, database_name, qualified_sql_name, list_properties, map_properties, category

Config: testAccViewResource(viewName),
Check: resource.ComposeTestCheckFunc(
testAccCheckViewExists("materialize_view.test"),
resource.TestCheckResourceAttr("materialize_view.test", "name", viewName),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few other attributes we should track like the schema_name, database_name, qualified_sql_name, statement

This was referenced Jun 13, 2023
@dehume dehume linked an issue Jun 13, 2023 that may be closed by this pull request
@bobbyiliev bobbyiliev requested a review from dehume June 14, 2023 19:01
@bobbyiliev bobbyiliev merged commit c6e6d61 into main Jun 14, 2023
@bobbyiliev bobbyiliev deleted the acceptance-tests branch June 14, 2023 19:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TF Acceptance Tests
2 participants