Skip to content

Commit

Permalink
add relative path test
Browse files Browse the repository at this point in the history
  • Loading branch information
haitham911 committed Jan 21, 2025
1 parent bced3b5 commit d0490de
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 10 deletions.
10 changes: 10 additions & 0 deletions examples/tests/test-vendor/vendor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,13 @@ spec:
version: "latest"
targets:
- "components/terraform/infra/my-vpc1"
- component: "vpc-src"
source: "../../demo-library/weather" # required for test URI contain path traversal
targets:
- "components/terraform/vpc-src"
included_paths:
- "**/*.tf"
- "**/*.md"
- "**/*.tftmpl"
- "**/modules/**"
excluded_paths: []
10 changes: 0 additions & 10 deletions tests/fixtures/scenarios/complete/vendor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,6 @@ spec:
# In 'source', Golang templates are supported https://pkg.go.dev/text/template.
# If 'version' is provided, '{{.Version}}' will be replaced with the 'version' value before pulling the files from 'source'.
# Download the component from the AWS public ECR registry (https://docs.aws.amazon.com/AmazonECR/latest/public/public-registries.html).
- component: "vpc-src"
source: "../../src" # required for test URI contain path traversal
targets:
- "components/terraform/vpc"
included_paths:
- "**/*.tf"
- "**/*.md"
- "**/*.tftmpl"
- "**/modules/**"
excluded_paths: []
- component: "vpc"
source: "oci://public.ecr.aws/cloudposse/components/terraform/stable/aws/vpc:{{.Version}}"
version: "latest"
Expand Down
4 changes: 4 additions & 0 deletions tests/test-cases/demo-stacks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -189,4 +189,8 @@ tests:
- "./components/terraform/weather/main/providers.tf"
- "./components/terraform/weather/main/variables.tf"
- "./components/terraform/weather/main/versions.tf"
- "./components/terraform/vpc-src/main.tf"
- "./components/terraform/vpc-src/outputs.tf"
- "./components/terraform/vpc-src/variables.tf"
- "./components/terraform/vpc-src/versions.tf"
exit_code: 0

0 comments on commit d0490de

Please sign in to comment.