github.com/danp/terraform@v0.9.5-0.20170426144147-39d740081351/builtin/providers/postgresql/GNUmakefile (about)

     1  # env TESTARGS='-run TestAccPostgresqlSchema_AddPolicy' TF_LOG=warn make test
     2  #
     3  # NOTE: As of PostgreSQL 9.6.1 the -test.parallel=1 is required when
     4  # performing `DROP ROLE`-related actions.  This behavior and requirement
     5  # may change in the future and is likely not required when doing
     6  # non-delete related operations. But for now it is.
     7  
     8  POSTGRES?=$(wildcard /usr/local/bin/postgres /opt/local/lib/postgresql96/bin/postgres)
     9  PSQL?=$(wildcard /usr/local/bin/psql /opt/local/lib/postgresql96/bin/psql)
    10  INITDB?=$(wildcard /usr/local/bin/initdb /opt/local/lib/postgresql96/bin/initdb)
    11  
    12  PGDATA?=$(GOPATH)/src/github.com/hashicorp/terraform/builtin/providers/postgresql/data
    13  
    14  initdb::
    15  	echo "" > pwfile
    16  	$(INITDB) --no-locale -U postgres -A md5 --pwfile=pwfile -D $(PGDATA)
    17  
    18  startdb::
    19  	2>&1 \
    20  	$(POSTGRES) \
    21  		-D $(PGDATA) \
    22  		-c log_connections=on \
    23  		-c log_disconnections=on \
    24  		-c log_duration=on \
    25  		-c log_statement=all \
    26  	| tee postgresql.log
    27  
    28  cleandb::
    29  	rm -rf $(PGDATA)
    30  	rm -f pwfile
    31  
    32  freshdb:: cleandb initdb startdb
    33  
    34  test::
    35  	2>&1 PGSSLMODE=disable PGHOST=/tmp PGUSER=postgres make -C ../../.. testacc TEST=./builtin/providers/postgresql | tee test.log
    36  
    37  psql::
    38  	$(PSQL) -E postgres postgres