Skip to content

Commit

Permalink
chore: try add test for dev-url
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Nov 20, 2023
1 parent e7b9e18 commit 55e39b8
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 5 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,10 @@ jobs:
../../scripts/local.sh ../../dist 0.0.0-pre.0
terraform init
terraform apply --auto-approve
env:
TF_LOG: DEBUG
- name: Terraform (no-dev-url)
working-directory: integration-tests/no-dev-url
run: |
../../scripts/local.sh ../../dist 0.0.0-pre.0
terraform init
terraform plan -no-color > stdout.txt
cat no-dev-url.txt | grep "Warning: dev_url is unset"
5 changes: 5 additions & 0 deletions integration-tests/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**/.terraform.lock.hcl
**/.terraform/*
**/terraform.d
**/*.db
**/stdout.txt
18 changes: 18 additions & 0 deletions integration-tests/no-dev-url/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
terraform {
required_providers {
atlas = {
source = "ariga/atlas"
version = "0.0.0-pre.0"
}
}
}

data "atlas_schema" "db" {
src = "file://schema.sql"
dev_url = "sqlite://file?mode=memory"
}

resource "atlas_schema" "db" {
hcl = data.atlas_schema.db.hcl
url = "sqlite://file.db"
}
5 changes: 5 additions & 0 deletions integration-tests/no-dev-url/schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CREATE TABLE t1 (
c1 INT,
c2 TEXT,
PRIMARY KEY (c1)
);
3 changes: 0 additions & 3 deletions integration-tests/sqlite/.gitignore

This file was deleted.

0 comments on commit 55e39b8

Please sign in to comment.