Commit Graph
44 Commits
Author SHA1 Message Date
Michael Li 8c796d0fc9 chore(enos): Use docker image generated from code (#3100) 2023-03-22 10:47:17 -04:00
Michael LiandJohan Brandhorst-Satzkorn acda0c3892 chore(enos): Add scenario that uses docker containers for infrastructure (#3073)
Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2023-03-15 10:07:36 -04:00
Josh Brand 4100d26826 Add extra IAM permissions for demo user creation during e2e tests (#3059)
These statements got nixed in the account migration, this policy should be applied to OSS (non-doormat) projects that need IAM access for testing
2023-03-07 17:22:55 -05:00
Michael Li 420952f6b8 chore(enos): Add scenario for e2e UI tests (#2813) 2023-03-02 14:32:53 -05:00
Michael Li 54aad4d292 chore(enos): Add debug variable (#3037) 2023-03-02 12:37:12 -05:00
Michael Li 713c121143 chore(enos): Default to use OSS edition (#3035)
There was an update to the build scripts to detect what edition of boundary is being built so that it knows which version of the UI to grab. However, this affected instances when building boundary on an architecture that is not the same as the host (in this case, we're building a linux/amd64 version on a mac). When the scripts try to use the built CLI to get the edition, it threw an `exec format error`.
2023-02-27 18:35:01 -05:00
Michael Li 604c701395 chore(enos): Define explicit dependencies between steps (#3031) 2023-02-27 12:27:18 -05:00
Michael Li 559c7aab24 chore(enos): Fix local creation of IAM (#3021) 2023-02-27 12:26:39 -05:00
Michael Li 5ec75924df refact(e2e): Set up variables to prepare for docker implementation (#2992)
* refact(e2e): Explicitly define port used for targets

To maintain consistency for how we define ports, this change explicitly defines the port used in the enos
scenario as opposed to relying on a "default" value. This change is in support of work that attempts to
spin up test infrastructure using docker. The openssh-server image uses Port 2222, which needs to be
passed to the test suite.

* refact(e2e): Add optional "Internal" Vault Address parameter

This change enables scenarios that need two different Vault addresses, one used by the Vault CLI and
one by the Boundary server instance. In the case when using a Docker container, the Boundary server
needs the Vault address "internal" to the Docker network, whereas the Vault CLI running outside of the
network needs a different address.
2023-02-23 12:05:06 -05:00
Mike Baum e1d078fa9f [QT-444] Use repo isolated AWS account for enos CI tests (#2727)
* [QT-444] Use repo isolated AWS account for enos CI tests
2023-02-16 17:07:30 -05:00
Mike Baum 0dc140045a [QT-400] Fix doormat hc-service-uri for ci bootstrap ci doormat role (#2944) 2023-02-09 11:23:52 -05:00
Michael Li d1429a40df chore(enos): Remove bats test from running in enos (#2929)
* chore(enos): Remove bats tests from enos

* chore(enos): Update cache name to match vault version
2023-02-07 16:30:38 -05:00
Mike Baum 9116755a9c [QT-400] Update ci boundary-enterprise hc-service-uri to include the schedule workflow trigger (#2925) 2023-02-07 14:00:51 -05:00
Michael Li 8ad861f426 test(e2e): Update migration test to use vault docker container (#2909)
* fix(enos): Make sure enos reports test as failure

After updating this command to save off the output from running `go test`, enos would not report when tests failed. This was due to the extra pipe hiding the exit status of the prior commands. Adding this option should return the status of the last command to exit with a non-zero status.

* doc(e2e): Fix comments

* refact(e2e): Update AuthenticateCli to accept auth method id

* refact(e2e/migration): Use docker to set up vault instead of enos

* refact(e2e/migration): Adjust where environment variables are set
2023-02-07 14:00:05 -05:00
Johan Brandhorst-Satzkorn 3c29308673 chore: Add license headers to all files 2023-02-03 15:54:27 -08:00
Michael Li 2f9727e8cf chore(enos): Upload e2e test output (#2863)
* chore(enos): Upload e2e go test output

* chore(enos): Add retention period
2023-01-31 17:28:54 -05:00
Josh Brand 7d49a3a06b Add automated cleanup for CI resources (#2814)
* Add automated cleanup for CI resources
2023-01-31 16:43:45 -05:00
Michael Li 5fd66b8d88 chore(enos): Remove unused skip_failing_bats_tests variable (#2844) 2023-01-25 12:44:04 -05:00
Ryan Cragun 23f1cdea27 enos: make the local build target configurable (#2313)
This makes the `make` build target that is used for local builder
variant configurable. This will allow us to utilize the local builder
variant in downstreams that might use different targets for their build.

* Make the local build target configurable
* Allow cross compiling `linux/amd64` on different platforms.
2022-12-19 14:35:10 -05:00
Michael Li 74f7ce93bc chore(e2e): Update to use Vault 1.12.2 (#2726) 2022-12-19 14:29:25 -05:00
Michael Li 26a85ef61b chore(e2e): Better output formatting (#2719)
Updating the `go test` command to include a table summary of test results at the end. This is the same command used by unit tests.
2022-12-15 14:57:24 -05:00
Michael Li 1596b02e53 test(e2e): Add database migration test (#2627)
* test(e2e): Add database migration test

* chore(enos): Add enos scenario for migration test

* chore(enos): Update go test command to use count option

* doc(e2e): Update readme with migration test details

* Fix: Typo

* CR: Use different library

* CR: Add additional context in comment

* CR: Move some code from test into functions

* doc(e2e): Add instructions to more easily retrieve environment variables

* refact(e2e): Create some more methods to increase test readability
2022-12-13 17:00:50 -05:00
Mike Baum 24c3d6824d [QT-396] Add Enos CI bootstrapping scenarios (#2621)
* Add Enos CI bootstrapping scenarios
* Add GitHub Actions workflow for CI bootstrapping
* Add service quotas limit increase request to Enos CI bootstrapping
2022-12-12 13:48:10 -05:00
Michael LiandJohan Brandhorst-Satzkorn 45171a3f56 refact(e2e): Changes to support an automated migration test (#2676)
* refact(e2e): Move cleanup steps into each test

The migration test needed to create some resources, but doesn't care about cleaning up because the test would take care of spinning down the docker container that it's using. To maintain flexibility going forward, we'll establish that tests are responsible for cleaning up (rather than the methods they use)

* refact(e2e): Use new env var for skip check

Currently, the e2e tests use the E2E_PASSWORD_AUTH_METHOD_ID environment variable to determine if the test should be skipped. However, the new migration test does not require a pre-existing boundary cluster and would not have this environment variable. As a result, we needed an alternative way to check if an e2e test should be skipped when running tests in ci.

* refact(e2e): Create more common boundary methods

* fix(e2e): Set to string value

Co-authored-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
2022-12-06 15:59:17 -05:00
Michael Li 0424d379cf refact(e2e): Reorganize test directory
Rearranges the directory structure to align better with the enos scenarios. Tests will now be added in the `tests` directory, with a folder in the directory corresponding to an enos scenario.
2022-10-27 17:40:13 -04:00
Michael Li 0cfedf08b1 test(e2e): Use Vault 1.12.0 in e2e tests (#2572)
Vault 1.12.0 was recently released. e2e tests should use the latest version to test against.
2022-10-27 09:57:44 -04:00
Josh Brand 0857cbb663 fix(e2e): Add missing project tags for targets 2022-10-12 09:49:08 -04:00
Michael Li 719200612d refact(e2e): Remove use of AwsHostSetCount env
Instead of passing in the number of hosts created for a host set, we can just use the length of the IP addresses to determine that value.
2022-10-12 09:49:08 -04:00
Michael Li 5365b29007 refact(e2e): Port enos smoke test into e2e test suite
This adds a test case to the e2e test suite and unifies where testing is located.
2022-10-12 09:49:08 -04:00
Michael Li a12846d9af refact(enos): Increase clarity in module variable name
This variable defines the IP address of a target used in tests. We should pass in the address itself instead of a list of addresses that will get converted to a single address eventually anyways.
2022-10-06 18:35:23 -04:00
Michael LiandJosh Brand da0fb9d38a test(e2e): Add dynamic host catalog test (AWS)
This adds the initial set of tests that validate setting up a dynamic host catalog on AWS

Co-authored-by: Josh Brand <jbrand@hashicorp.com>
2022-10-05 11:54:16 -04:00
Michael Li 8fe0d13caa test(e2e): Add vault tests
Adds the first set of vault tests. This test sets up vault as a credential store and creates a set
of credentials for a target.
2022-09-27 12:21:10 -04:00
Louis Ruch b7684a857a feat(ssh): Use HostId as HostKeyAlias for connect ssh helper (#2490) 2022-09-22 17:51:30 -07:00
Jaymala 611bf80279 Add infrastructure tags to Enos scenarios (#2486)
Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-09-22 13:29:25 -04:00
Johan Brandhorst-SatzkornandTimothy Messier 5dbcda512a Fix enos bats test errors (#2468)
* test(cli): Remove skips in CI for cli tests

* fix(enos): Fix enos bats tests

The tests still sometimes suffer from timing issues,
but I was able to run a successful run (setup, run, destroy)
of the tests from my machine at least once.

There were 2 issues:

- Some tests in groups.bats were hardcoding the default user id
- The default grants for a user in a project were missing
   the permission to connect to a target. We now add this
   explicitly.

Co-authored-by: Timothy Messier <tim.messier@gmail.com>
2022-09-20 14:39:28 -04:00
Louis Ruch 42696d5da6 enos(smoke): Test brokered credential consumption instead of manually (#2456)
passing private key to boundary connect
2022-09-16 15:41:38 -07:00
Michael Li 21e4b70e27 test(e2e): Add end-to-end tests (connect to first target)
This adds the initial end-to-end tests. These tests validate the admin workflow
of setting up their first target
2022-09-16 15:30:12 -04:00
Michael Li 172381f273 refact(enos): Move modules to its own file
Enos allows module definitions to be in any file. This keeps all of the modules
in one place (and also follows the model used by Vault)
2022-09-16 15:30:12 -04:00
Jeff Mitchell 53b5e532d5 Remove deprecated methods/fields on targets (#2393) 2022-09-15 09:20:08 -04:00
Josh Brand 8c0efb9715 Enos: add additional guards before authentication (#2382)
* Enos: add additional guards before authentication

Previously, we would see failures when the ALB in front of a
cluster was alive and passing healthchecks, but the database behind
had not been initialized yet.  This adds a check with an unauth'd
call to `auth-methods list` to validate the DB is up before auth.
2022-08-23 14:46:24 -04:00
Jaymala 369f818f4c Update Enos run (#2326)
* Rotate the credential used for the Enos SSH Key
* Use the enos provider from TFC

Signed-off-by: Jaymala Sinha <jaymala@hashicorp.com>
2022-08-16 11:07:19 -06:00
Jeff Mitchell 9c03ef2105 Fix TF character usage 2022-08-05 18:30:43 -04:00
Jeff Mitchell d92cbac37d Update enos/bats with changes 2022-08-05 18:17:07 -04:00
9169c6bacb [QTI-220] Add infrastructure integration testing (#2282)
* [QTI-275] Add infrastructure integration testing

On pull requests that originate from branches of the `hashicorp/boundary`
repo, we now conditionally dispatch infrastructure integration tests using
the Enos framework. The `integration` Enos scenario includes two `builder`
variants which allow developers or CI to deploy a Boundary cluster in AWS
using either a local `boundary` install bundle or that which is produced
in the `build` workflow for CRT. The `test` variants determine which type
of infrastructure integration test to run. At present those options are
`cli_ui` (Bats CLI tests) or `smoke` (creates target instances and a
target host catalog and verifies that `boundary` works).

In addition to the new workflow and quality scenarios, we simplified the
some `build` workflow steps and added Go module caching to speed up the
build pipeline.

See the [enos/README.md](https://github.com/hashicorp/boundary/blob/main/enos/README.md)
for a detailed explanation on how to configure and execute Enos scenarios
from your machine.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Co-authored-by: Rebecca Willett <rwillett@hashicorp.com>
Co-authored-by: Josh Branch <jbrand@hashicorp.com>
2022-07-28 14:48:51 -06:00