Граф коммитов

335 Коммитов

Автор SHA1 Сообщение Дата
AJ Bahnken 0c11a35287
fix install instructions (#400) 2020-10-23 12:50:32 -07:00
bqbn 2cc0675b83
Add an rds check (#388)
* Check RDS snapshots are not too old

* Make black happy

* Add a doc string

Co-authored-by: AJ Bahnken <1144310+ajvb@users.noreply.github.com>
2020-10-22 17:20:37 -07:00
AJ Bahnken 5ae768c89b
Support for allowed ports for GCP firewall tests (#391)
* Support for allowed ports for GCP firewall tests

Adds support for allowed ports in GCP firewall tests

As well, switch from the term "whitelisted" to "allowed"

* Add comments about allowed_ports* config opts
2020-10-19 11:01:16 -07:00
bqbn f9109d782b
Check EC2 EBS snapshots are not too old (#382)
* Check EC2 EBS snapshots are not too old

* Update a test case with datetime.now()

* Make black happy
2020-10-12 10:36:12 -07:00
Hal Wine ceab2ae40b
[DOC] Support Markdown in docs (#376) (#381)
* Support Markdown in documents

Uses `myst_parser` to process Markdown files in the Sphinx workflow.
Using that, included the top level `README.md` as the "Overview" in the
rendered docs.

Some tweaks were needed to have `README.md` render correctly in rendered
docs. Still renders okay via GitHub.

Add a makefile target `doc-preview` to serve the locally built docs.

Fix some links in the README file.

Co-authored-by: Sven Marnach <sven@mozilla.com>
2020-10-08 17:36:16 -07:00
Hal Wine 3c2bd341b9
[DOC] fix broken links in docs 2020-10-08 14:50:40 -07:00
bqbn faead42b01
Check an S3 bucket should have a life cycle policy (#358)
* Check an S3 bucket should have a life cycle policy

* Use an f-string

* Fix a Black error

* Pass ids to the parametrize call

Also fix get_s3_bucket_name function so that it can handle cases when `bucket`
is not a dictionary.

* Use the get_s3_bucket_name_only function

* Fix the function name

Co-authored-by: AJ Bahnken <1144310+ajvb@users.noreply.github.com>
2020-10-08 12:02:28 -07:00
bqbn 68686af1f1
Check RDS storage type is not io1 (#359)
* Check RDS storage type is not io1

* Rename a test file

Because we're checking not just for "io1" but also anything that starts with "io".

* Make black happy
2020-10-08 10:01:17 -07:00
Sven Marnach ef7191f99f
Remove the generated docs. (#380)
* Remove the generated docs.

They are build from Travis now.

* Update instructions for Sphinx installation.
2020-10-07 17:59:19 -07:00
bqbn bb00c370e8
Check ec2 ebs volumes are attached to instances (#360)
* Check ec2 ebs volumes are attached to instances

* Remove an unused module

* Add a doc string
2020-10-07 17:51:49 -07:00
Hal Wine 8edba004bd
Add link to S3 naming conventions 2020-10-07 14:08:52 -07:00
Sven Marnach 0f7a14ef49
Publish documentation from Travis to gh-pages branch. (#377)
* Publish documentation to gh-pages branch.

* gh-pages: Address review comments.
2020-10-06 20:57:19 +02:00
Bob Micheletto cc46a423fb
Add a Contributing Documentation section. (#379)
* Adds a Contributing Documentation section.
2020-10-06 08:18:37 -07:00
AJ Bahnken 93dd07235f
Add caching back to GCP (#378)
fixes #363
2020-10-05 12:10:37 -07:00
Hal Wine 6dbe907d44
Add importance of supporting --offline (#326)
If you don't, you break doctests!
2020-10-05 11:18:31 -07:00
Greg Guthe 8310589792
ci: enable deploying tags to pypi (#370) 2020-10-05 09:16:30 -04:00
Hal Wine 3c2e04b561
Revert "Add markdown support to our Sphinx docs (#374)"
Breaks document modification -- forgot to test in clean checkout :/
2020-10-04 10:11:29 -07:00
Hal Wine 33a5f12305
Fixup for #374 (#375)
* Files missed in original commit

These are ignored by default in the root .gitignore
2020-10-04 08:49:30 -07:00
Hal Wine 7b759b95ea
Add markdown support to our Sphinx docs (#374)
* Add tooling to support Markdown pages

* Add top level README to docs

Co-authored-by: Hal Wine <hal@dtor.com>
2020-10-04 08:35:44 -07:00
Bob Micheletto 70f30ffc5d
Add a test for SNS Topics that have no subscriptions. (#371)
* Adds topic test, and works except for the lambda function.

* Adds the test code.

* Contains a lambda fix as suggested by @ajvb, this is now working.

* Adds rationale.

* Black formatting fixes.
2020-10-02 14:01:41 -07:00
AJ Bahnken 1a9dde7e9b
Upgrade google_api_python_client (#368) 2020-10-02 10:06:20 -07:00
Hal Wine 9410f0e96f
Heroku breaking build, remove for now (#366)
* Heroku breaking build, remove for now

This was never fully finished, and is not used in production.
2020-10-01 11:31:21 -07:00
AJ Bahnken a6365fc068
AWS S3 id function fix (#364) 2020-09-30 15:06:15 -07:00
AJ Bahnken 6cfc4ace77
Rework GCP code to support folder id arg (#361)
* Rework GCP code to support folder id arg

Reworks the GCP client, resources, and test code to add support for
passing in a Folder ID and running tests against all of the projects
within that folder.

Alongside that, this includes some stability fixes to the client code,
creates a new "frost" named cli arg group, and removes caching from the
GCP client.

* code review/clean up for #361
2020-09-29 14:30:49 -07:00
Greg Guthe 047e338158
add --aws-regions cli arg (#354)
fixes: #348
2020-09-18 16:00:20 -07:00
Greg Guthe aefc58dbbf
add oauth2client to requirements (#352)
and sort them
2020-09-18 17:19:58 -04:00
AJ Bahnken 62a684cd71
Remove regression marking (#347) 2020-09-18 17:14:19 -04:00
Greg Guthe 282f6796e5
Dont err when cache disabled (#351)
* fix errors running with cache disabled

* readme: document disabling the cache
2020-09-18 17:13:55 -04:00
Greg Guthe 46917b0be7
remove circleci (#345) 2020-09-18 09:07:27 -04:00
Greg Guthe 52409499ce
Fix 302 add cli bin (#341)
* setup.py: require python 3.8

* setup.py: add shebang

* add frost dir with VERSION and SOURCE_URL

* add click to requirements

* add frost module and pass through cli

* make: pytest -> frost test

* make: install as python package

* run pytest from the repo root directory

so we discover frost conftest and tests

* readme: update install directions and examples

* make: add test files to awsci target

* update dockerfile to install python package

* add requirements to setup.py

* bump version to 0.4.0

* make: remove python version check

setup.py specifies supported python versions

* ci: drop travis tests against python <3.8

* ci: drop travis ripgrep install

rg removed
2020-09-17 15:53:32 -04:00
Bob Micheletto 05c8a7fa32
Add SNS tests. (#334)
* WIP: Adding sns tests.

* This now works and is relatively fast.  It combines the suggestion from g-k, fixes from sven, and the slice from rds_db_snapshots_attributes().

* Reformat with black.

* Updates for latest pytest.

Co-authored-by: Sven Marnach <sven@mozilla.com>
2020-09-17 15:18:12 -04:00
Brian Pitts 1ac2b76520
Ensure GKE nodes are on a recent rather than just a valid version (#337)
Before, the test checked if the node version is in validNodeVersions. However, unlike the short validMasterVersions the list in validNodeVersions is very long and goes all the way back to k8s 1.6. Thus, this did not actually test that the node version was up-to-date.

I initially thought to just check that the node version matched the master version, but realized this is not a good idea since google doesn't upgrade clusters and nodes in lockstep.

Instead, I've changed the check to verify that the node version is in the list of valid master versions. That should ensure we're on a recent version and still pass in the gap between cluster and node upgrades.
2020-09-16 09:52:52 -04:00
Greg Guthe 9f14ba1dc3
default to not collecting any tests (#336)
fix: #311
2020-09-15 17:55:24 -04:00
AJ Bahnken 6d4a390aac
Add test for checking specific versions of GKE (#335) 2020-09-15 14:52:52 -07:00
Greg Guthe 650508b7df
readme: doc --gcp-project-id (#338) 2020-09-15 17:29:48 -04:00
Greg Guthe 9de9554383
update pytest and pytest plugins (#315)
* update pytest and pytest plugins

* conftest: add rationale and service markers

* s/get_marker/get_closest_marker/

> #4546: Remove Node.get_marker(name) the return value was not usable for more than a existence check.
>
> Use Node.get_closest_marker(name) as a replacement.

https://docs.pytest.org/en/6.0.2/changelog.html#pytest-4-1-0-2019-01-05

* replace removed _genid with nodeid

* aws: fix typo in iam_users_with_policies_and_groups docstring

Co-authored-by: Hal Wine <132412+hwine@users.noreply.github.com>

* add get_param_id to top level helpers

* handle test idfns failing with NotSetType for offline empty param lists

fix confusing pytest parmetrize doctest errors

* Fixes for pytest upgrade and new datetime parsing

* Create a new global for our CustomConfig obj
* Fix parameterize id calls where it's getting a list
* Use timezone info in datetime related tests

* Fix formatting + use get_param_id in redshift helpers

* switch ordering on rds id func for unit tests

Co-authored-by: Hal Wine <132412+hwine@users.noreply.github.com>
Co-authored-by: AJ Bahnken <aj@ajvb.me>
2020-09-15 15:20:38 -04:00
Greg Guthe acaa2ff3f6
elb: add test for http desync setting (#332) 2020-09-14 17:30:03 -04:00
Brian Pitts 6357bced94
Bpitts/aws ec2 ebs piops (#330)
* Add check for use of provisioned iops in EC2

* Only try to convert cached strings to datetimes if they are in ISO format

Before this, we were converting volume types to datetimes.

```
>>> from dateutil.parser import parse
>>> volume_type="st1"
>>> parse(volume_type, ignoretz=True)
datetime.datetime(2020, 9, 1, 0, 0)
```

* Paint it black

* Even blacker

* Update test to match new json_iso_datetime_string_to_datetime func

Co-authored-by: AJ Bahnken <aj@ajvb.me>
2020-09-14 11:46:55 -07:00
Sven Marnach 2748afc976
Add test to verify that all EIPs are bound to instances. (#331) 2020-09-14 10:35:13 -07:00
Sven Marnach 41bdffbd5e
Fix name of snowman logo. (#327) 2020-09-01 08:02:07 -07:00
AJ Bahnken b0403328c8
Cleanup service report generator (#321)
* Remove markdown support

* Add resource name to test results

* remove csv output option

* remove ReportGenerator

* Remove pytest-html

* Remove pytest-cov

* Revert "Remove pytest-cov"

This reverts commit 9531787540.
2020-08-06 12:36:29 -07:00
Greg Guthe dbeab0601b
readme: add logo (#322)
per @jvehent logo is licensed for public use
2020-08-06 10:39:45 -07:00
Hal Wine 547223e83f
Replace use of 'rg' for CircleCI (#319)
* Replace use of 'rg' for CircleCI

'rg' isn't part of the base images, and may not be on some dev's
machines. So switch to the old standby of 'grep' -- with a bunch more
options for the same behavior.

* Reenable check_conftest_imports

Had been disabled until 'rg' replaced with 'grep'.
2020-08-05 12:04:03 -07:00
AJ Bahnken 0ed350ec49
Get associated tags for elbs (#320) 2020-08-05 11:42:29 -07:00
Hal Wine c8990b2f3c
Docs & FAQ (#318)
Docs!

* Add rendered docs for gh-pages delivery

Scheme based on
  https://github.com/sphinx-doc/sphinx/issues/3382#issuecomment-409068915

* Makefile support for gh-pages hosted docs

N.B. we require user to have sphinx installed globally at the moment.
That is somewhat reasonable, as Rust language uses sphinx for
documentation.

If we end up wanting specific sphinx extensions, we'll have to add
those requirements to a (not yet in existence) requirements-dev.txt.
2020-08-04 14:26:59 -07:00
Hal Wine d800bc99a3
Make circleci work (#317)
Tweak some syntax and don't try to run tests that will fail.

Fixes GH-316
2020-08-04 11:20:19 -04:00
Greg Guthe 84ac92ae24
remove pagerduty client and tests (#314) 2020-08-03 13:02:30 -04:00
Greg Guthe 14ea3c77e4
Fix 302 containerize (#310)
* add Dockerfile

* make: add build-image

* ci: add circle config to push images

* update readme to use docker image
2020-07-30 16:24:26 -04:00
Greg Guthe fa8a1ce860
cache: remove PY2 import from pytest internals (#309)
fails with ImportError and we don't support Python 2
2020-07-30 14:25:43 -04:00
Hal Wine 4240b16a7c
Makefile should report non prod python versions (#305)
Fixes #304

We really care about the minimum version that is currently advertised as
being supported. The assumption is, anything that works on the minimum
version will continue to work on a later version.

Yes, CI will catch this -- the hope is this message may prevent a dev
from only finding out that late in the process. We could consider
removing this once tox testing is implemented.
2020-07-28 16:38:42 -07:00