Git Product home page Git Product logo

mini-mono's Introduction

mini-mono

Discovery for terraform test replicating a mono repo with modules

Getting Started

Set your gcloud ADC

gcloud auth application-default login

And environment variables

export GOOGLE_CLOUD_PROJECT="..."

Run the tests

Navigate to the module to be tested

cd ./modules/bucket

Initialise the module terrform

terraform init

You can run all tests within the modules tests/ folder by running:

terraform test

You should get the following output

tests/integration.tftest.hcl... in progress
  run "integration_test"... pass
tests/integration.tftest.hcl... tearing down
tests/integration.tftest.hcl... pass
tests/unit.tftest.hcl... in progress
  run "unit_test_valid_name"... pass
  run "unit_test_invalid_location"... pass
tests/unit.tftest.hcl... tearing down
tests/unit.tftest.hcl... pass

Success! 3 passed, 0 failed.

You can also specify which tests to run.

A file naming pattern has been used to separate unit tests (plan) from integrations tests (apply).

terraform test -filter=tests/unit.tftest.hcl
terraform test -filter=tests/integration.tftest.hcl

mini-mono's People

Contributors

arivictor avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.