From 302467c45f3909a98554afbd61834397225fe99c Mon Sep 17 00:00:00 2001 From: Itay Zagron Date: Mon, 4 Oct 2021 16:50:55 +0300 Subject: [PATCH] fixed migration test --- .github/workflows/test_migration.yml | 22 +--------------------- client/testdata/initial_migration.hcl | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 21 deletions(-) create mode 100644 client/testdata/initial_migration.hcl diff --git a/.github/workflows/test_migration.yml b/.github/workflows/test_migration.yml index 05d980ea1..b8e1b50e1 100644 --- a/.github/workflows/test_migration.yml +++ b/.github/workflows/test_migration.yml @@ -72,29 +72,9 @@ jobs: env: OS: Linux - - name: Check out code into the initial migration tag - run: | - git fetch origin -p - git checkout "refs/tags/v0.5.7" - git checkout origin/main client/testdata/default.hcl - - - name: Get dependencies - run: | - go get -v -t -d ./... - - - name: Build - run: go build -v . - - name: Build initial schema run: | - rm -rf .cq_reattach - CQ_PROVIDER_DEBUG=1 go run main.go & while [ ! -f .cq_reattach ]; do sleep 1; done && \ - ./cloudquery provider build-schema aws --config ./client/testdata/default.hcl --enable-console-log - env: - CQ_REATTACH_PROVIDERS: .cq_reattach - - - name: Check out code into the initial migration tag - run: git checkout main + ./cloudquery provider build-schema aws --config ./client/testdata/initial_migration.hcl --enable-console-log - name: Get dependencies run: | diff --git a/client/testdata/initial_migration.hcl b/client/testdata/initial_migration.hcl new file mode 100644 index 000000000..faada8f9a --- /dev/null +++ b/client/testdata/initial_migration.hcl @@ -0,0 +1,19 @@ +cloudquery { + plugin_directory = "./cq/providers" + policy_directory = "./cq/policies" + + provider "aws" { + source = "cloudquery/cq-provider-aws" + version = "v0.5.7" + } + + connection { + dsn = "host=localhost user=postgres password=pass database=postgres port=5432 sslmode=disable" + } +} + +provider "aws" { + configuration {} + resources = [ + "*"] +} \ No newline at end of file