The hcp monthly billing views build a range of buckets using the
`generate_series` and the `now()` functions along with relative offsets
like `+ 1 month`. The calculated start and end times for these views can
vary depending on the time zone setting of the PostgreSQL server.
This adds 3 table functions that call their respective views with the
time zone set to UTC. Calling these functions instead of their
underlying views directly prevents the returned values from varying when
the server's time zone is not set to UTC.
This also drops support for PostgreSQL 11. The included tests use the
`date_trunc(field, source [, time_zone ])` function added in PostgreSQL
12.
Fixes: 41b1b5b4b7
This adds new makefile targets and configuration to run the tests in the
api and sdk modules. These do not run by default since `go test ./...`
does not cross module boundaries.
* refactor (oidc): Stop emitting error for not found token id
Stop emitting errors when authtoken repo.IssueAuthToken is called and
there's if no pending token. It's not an "normal" state and not
an error condition.
* feature (audit tagging): Add tags for auth method requests/responses
Including testing functions for asserting audit events created
when a service is called
This updates the test-ci target to startup the test database container
first, wait for it to be ready, and then start running the tests.
It also creates some new targets for local devs. Prior to running any
tests either via `make test` or `go test`, the database should be
started with:
make test-database-up
It can take a few seconds for the database to fully initialize, the
status can be checked with:
docker logs -f boundary-sql-tests
This database can be stopped and destroyed with:
make test-database-down
In general it should only need to be restarted when new migrations are
added. But it might also be necessary to restart if some tests fail in
an unexpected way and fail to do cleanup steps.
* docs: update contributing guide with pronoun expectation and link to community guidelines
* Update CONTRIBUTING.md
Co-authored-by: Jasmine Dahilig <jasmine@dahilig.com>
Co-authored-by: Jasmine Dahilig <jasmine@dahilig.com>