Skip to content

Commit

Permalink
chore: added test for no-version warning
Browse files Browse the repository at this point in the history
  • Loading branch information
giautm committed Nov 20, 2023
1 parent 55e39b8 commit c6b6e26
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ jobs:
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"
terraform init > /dev/null
terraform plan -no-color | grep "Warning: dev_url is unset"
- name: Terraform (no-version)
working-directory: integration-tests/no-version
run: |
../../scripts/local.sh ../../dist 0.0.0-pre.0
terraform init > /dev/null
terraform plan -no-color | grep "Warning: version is unset"
19 changes: 19 additions & 0 deletions integration-tests/no-version/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
terraform {
required_providers {
atlas = {
source = "ariga/atlas"
version = "0.0.0-pre.0"
}
}
}

data "atlas_migration" "db" {
dir = "./migrations"
url = "sqlite://file.db"
}

resource "atlas_migration" "db" {
dir = "./migrations"
url = "sqlite://file.db"
dev_url = "sqlite://file?mode=memory"
}
6 changes: 6 additions & 0 deletions integration-tests/no-version/migrations/20231120145001.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE t1 (
c1 INT,
c2 TEXT,
PRIMARY KEY (c1)
);

6 changes: 6 additions & 0 deletions integration-tests/no-version/migrations/20231120145012.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CREATE TABLE t2 (
c1 INT,
c2 TEXT,
PRIMARY KEY (c1)
);

3 changes: 3 additions & 0 deletions integration-tests/no-version/migrations/atlas.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
h1:dy0koXujpoUhVPowi2KP9Qoq0Sr6trcEmvrVWWXnN24=
20231120145001.sql h1:08Mdpo805VLOztN/C3vpi/pIyDjMCGFHfA/pmhtcgJI=
20231120145012.sql h1:h1DU3vLKHhhV6ilw6+DQ1plbVpRXQxZi4PYDgDmRDZs=

0 comments on commit c6b6e26

Please sign in to comment.