Commit Graph
37 Commits
Author SHA1 Message Date
Michael Anthony 1a5b9cf5d9 Add enos bucket module (#3225) 2023-05-16 11:49:23 -06:00
Josh Brand 5ac29eb2e5 feat(e2e): Add configurable timeout for go test execution within scenarios (#3213) 2023-05-09 14:55:19 -04:00
Josh Brand 9a050ec15a chore(e2e): Update test attributes for new builds (#3189) 2023-04-27 14:59:46 -04:00
Michael Li 33f3a5ff9c test(e2e): Add test that uses new worker resource (#3177) 2023-04-24 16:58:39 -04:00
Michael Li d25f4493d3 test(e2e): Improve reliability of enos docker scenario (#3167) 2023-04-19 17:03:38 -04:00
Michael AnthonyandJosh Brand 073f8fe98e [QT-405] Create solo worker module (#3148)
* Create solo worker module

---------

Co-authored-by: Josh Brand <jbrand@hashicorp.com>
2023-04-12 14:21:23 -06:00
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
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 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
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
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
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 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
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
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
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
Jeff Mitchell 53b5e532d5 Remove deprecated methods/fields on targets (#2393) 2022-09-15 09:20:08 -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