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

Make fluent_test an E2E test #24

Merged
merged 2 commits into from
Feb 6, 2024
Merged

Conversation

mumoshu
Copy link
Collaborator

@mumoshu mumoshu commented Jan 30, 2024

This enhances the fluentd test that previously required an existing test environment (with a VPC, a bucket, and an EKS cluster) to not depend it.

It uses another library mumoshu/testkit and some terraform code to provision and reference to necessary AWS and K8s resources within the test.

At this point, I verified it to work with the following envvars:

  • AWS_DEFAULT_REGION
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • VPC_ID (at least two public subnets needed)

The only TODO is that, the test does not clean up the S3 bucket. testkit does run terraform destroy on test cleanup, but we don't yet clean up objects in the bucket beforehand, which prevents the bucket deletion.

This enhances the fluentd test that previously required an existing test environment (with a VPC, a bucket, and an EKS cluster)
to not depend it.

It uses another library `mumoshu/testkit` and some terraform code to provision and reference to necessary AWS and K8s resources within the test.

At this point, I verified it to work with the following envvars:

- AWS_DEFAULT_REGION
- AWS_ACCESS_KEY_ID
- AWS_SECRET_ACCESS_KEY
- VPC_ID (at least two public subnets needed)

The only TODO is that, the test does not clean up the S3 bucket. `testkit` does run `terraform destroy` on test cleanup, but we don't yet clean up objects in the bucket beforehand, which prevents the bucket deletion.
@mumoshu mumoshu merged commit 905eab8 into chatwork:main Feb 6, 2024
@mumoshu mumoshu deleted the fluentd-test branch February 6, 2024 04:23
@mumoshu mumoshu mentioned this pull request Feb 6, 2024
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.

2 participants