### Start Test Database Container Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Starts the PostgreSQL database container required for running most tests. This command initializes a template database with Boundary migrations. ```bash $ make test-database-up ``` -------------------------------- ### Install Dependencies with Homebrew Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md Installs necessary tools like Terraform, Vault, and Enos using Homebrew. Ensure you have the correct versions installed. ```shell brew tap hashicorp/tap brew install hashicorp/tap/terraform brew install hashicorp/tap/vault brew install enos coreutils jq # (Optional) export ENOS_VAR_boundary_license=${license_key} # Install doormat cli for AWS access brew tap hashicorp/security git@github.com:hashicorp/homebrew-security.git brew install hashicorp/security/doormat-cli ``` -------------------------------- ### Start Boundary in Dev Mode Source: https://github.com/hashicorp/boundary/blob/main/internal/tests/cli/README.md Use this command to start Boundary in development mode for testing purposes. ```bash boundary dev ``` -------------------------------- ### Start Boundary in Development Mode Source: https://github.com/hashicorp/boundary/blob/main/README.md Starts Boundary in development mode, launching both a controller and a worker. This mode automatically sets up a PostgreSQL container for storage and uses an internal KMS. ```bash $GOPATH/bin/boundary dev ``` ```bash boundary dev ``` -------------------------------- ### Install Development Tools for Boundary Source: https://github.com/hashicorp/boundary/blob/main/README.md Installs the specific versions of development tools used by the Boundary team. Running this may overwrite existing tools in your Go binary directory. ```bash make tools ``` -------------------------------- ### Start and Run SQL Tests Source: https://github.com/hashicorp/boundary/blob/main/internal/db/sqltest/README.md Commands to manage the test database and run tests. Useful for iterative development of new tests. ```bash # starts database docker image in the background make database-up ``` ```bash # runs the tests, call this multiple times while implementing new tests. make run-tests ``` ```bash # to clean up make clean ``` -------------------------------- ### Install Git on EC2 Instance Source: https://github.com/hashicorp/boundary/blob/main/enos/ipv6-aws-host.md.md Installs the Git version control system on the EC2 instance using yum. Git is required for cloning repositories and managing code. ```bash sudo yum install git ``` -------------------------------- ### View Trace with gotraceui Source: https://github.com/hashicorp/boundary/blob/main/testing/TRACING.md Visualize the collected trace data using the gotraceui tool. Ensure you have gotraceui installed or run it directly using go run. ```bash $ go run honnef.co/go/gotraceui/cmd/gotraceui@master trace.out ``` -------------------------------- ### Run Boundary CLI Tests (Untagged) Source: https://github.com/hashicorp/boundary/blob/main/internal/tests/cli/README.md Execute the bats tests against an untagged, non-versioned Boundary installation. ```bash bats -p boundary/ ``` -------------------------------- ### Install Homebrew on EC2 Instance Source: https://github.com/hashicorp/boundary/blob/main/enos/ipv6-aws-host.md.md Installs Homebrew, a package manager for macOS and Linux, on the EC2 instance. Follow the post-installation instructions provided by Homebrew to install necessary development tools like GCC. ```bash https://brew.sh/ ``` -------------------------------- ### Get Environment Information for Non-E2E Scenarios Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md Retrieves environment information for scenarios that do not start with 'e2e' using an Enos command. This is useful for inspecting the created infrastructure. ```bash enos scenario output hcp_session_recording builder:local ``` -------------------------------- ### Specify Docker Image Tag Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Builds and starts the test database container using a specific PostgreSQL Docker image tag. This allows testing against different PostgreSQL versions. ```bash $ make IMAGE_TAG=docker.io/hashicorpboundary/postgres:12-alpine test-database-up ``` ```bash $ make IMAGE_TAG=docker.io/hashicorpboundary/postgres:13-alpine test-database-up ``` ```bash $ make IMAGE_TAG=docker.io/hashicorpboundary/postgres:alpine test-database-up ``` -------------------------------- ### Customize PostgreSQL Options Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Passes custom options to the PostgreSQL server when starting the test database container. This is useful for troubleshooting memory or connection issues by adjusting parameters like `max_connections`. ```bash make PG_OPTS="-c max_connections=1000" test-database-up ``` -------------------------------- ### Configure Test Database Port Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Changes the host port for the test database container by setting the `TEST_DB_PORT` environment variable before starting the container. ```bash $ export TEST_DB_PORT=5433 $ make test-database-up $ make test ``` -------------------------------- ### Configure Test Container Name Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Sets a custom name for the test database container using the `TEST_CONTAINER_NAME` environment variable. This name is used for starting the container and viewing its logs. ```bash $ export TEST_CONTAINER_NAME="custom-name" $ make test-database-up $ docker logs custom-name ``` -------------------------------- ### Initialize and Use Oplog Ticket and Write Entry Source: https://github.com/hashicorp/boundary/blob/main/internal/oplog/README.md Demonstrates initializing a ticket, writing a user to the database, retrieving a ticket for oplog operations, creating a new oplog entry with metadata, and writing the entry with messages. Handles transaction rollback on error. ```go // you must init the ticket in its own transaction. You only need // to init a ticket once in the database. It doesn't need to happen for // every connection. Once it's persistent in the database, you can simply Get it. initTx := db.Begin() ticketer := &GormTicketer{Tx: initTx} err = ticketer.InitTicket("users") // if there's no error, then commit the initialized ticket initTx.Commit() userCreate := oplog_test.TestUser{ TestUser: oplog_test.TestUser{ Name: loginName, }, } tx := db.Begin() // write the user to the database tx.Create(&userCreate) ticketer = &GormTicketer{Tx: db} // get a ticket for writing users to the oplog ticket, err := ticketer.GetTicket("users") // create an entry for the oplog with the entry's metadata (likely the entry's Scope) newLogEntry := NewEntry( "test-users", []Metadata{ Metadata{ Key: "deployment", Value: "amex", }, Metadata{ Key: "project", Value: "central-info-systems", }, }, cipherer, // wrapping.Wrapper ticketer, ) // write an entry with N messages (variadic parameter) in the order they were sent to the database _, err = newLogEntry.WriteEntryWith( context.Background(), &GormWriter{tx}, ticket, &Message{Message: &userCreate, TypeName: "user", OpType: OpType_CREATE_OP}, ) // if there's an error writing the oplog then roll EVERYTHING back if err != nil { tx.Rollback() } // no err means you can commit all the things. tx.Commit() ``` -------------------------------- ### Create Resource with Oplog Entry Source: https://github.com/hashicorp/boundary/blob/main/internal/db/README.md Demonstrates creating a resource using the `Create` writer method. Supports options for writing Oplog entries, requiring the caller to manage the transaction lifecycle. ```go // There are writer methods like: Create, Update and Delete // that will write Gorm struct to the db. These writer methods // all support options for writing Oplog entries for the // caller: WithOplog(yourWrapper, yourMetadata) // the caller is responsible for the transaction life cycle of the writer // and if an error is returned the caller must decide what to do with // the transaction, which is almost always a rollback for the caller. err = rw.Create(context.Background(), user) ``` -------------------------------- ### Build Boundary from Source Source: https://github.com/hashicorp/boundary/blob/main/README.md Builds the Boundary binary from source. This command may take a few minutes on the first run as it fetches and compiles UI assets. ```bash make install ``` -------------------------------- ### Set Boundary Address Environment Variable Source: https://github.com/hashicorp/boundary/blob/main/internal/tests/cli/README.md Set the BOUNDARY_ADDR environment variable to direct tests towards an existing Boundary installation. ```bash export BOUNDARY_ADDR= ``` -------------------------------- ### Build and Run Boundary with Debugging Enabled Source: https://github.com/hashicorp/boundary/blob/main/testing/TRACING.md Build the Boundary binary and run it in development mode with the debug flag enabled and an ops listener configured. This exposes the pprof endpoint for tracing. ```bash make build boundary dev -debug -ops-listen-address=127.0.0.1:9203 ``` -------------------------------- ### Run All Tests (API, SDK, and Database) Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md A convenience target to run all available tests, including API, SDK, and those requiring the test database. ```bash $ make test-all ``` -------------------------------- ### Query and Scan Rows into Gorm Struct Source: https://github.com/hashicorp/boundary/blob/main/internal/db/README.md Shows how to query the database and scan the resulting rows into a Gorm struct using `Query` and `ScanRows`. Proper error handling for rows and the query itself is demonstrated. ```go // There's reader ScanRows that facilitates scanning rows from // a query into your Gorm struct where := "select * from test_users where name in ($1, $2)" rows, err := rw.Query(context.Background(), where, []interface{}{"alice", "bob"}) defer rows.Close() for rows.Next() { user := db_test.NewTestUser() // scan the row into your Gorm struct if err := rw.ScanRows(rows, &user); err != nil { return err } // Do something with the Gorm user struct } if err := rows.Err(); err != nil { // do something with the err } ``` -------------------------------- ### Run Boundary E2E Tests with Go Source: https://github.com/hashicorp/boundary/blob/main/testing/internal/e2e/README.md Commands to execute Boundary E2E tests using the `go test` command. Supports running all tests in a package, verbose output, or targeting specific tests. ```shell go test github.com/hashicorp/boundary/testing/internal/e2e/tests/base ``` ```shell go test ./target/ // run target tests if running from this directory ``` ```shell go test github.com/hashicorp/boundary/testing/internal/e2e/tests/base -v // verbose ``` ```shell go test github.com/hashicorp/boundary/testing/internal/e2e/tests/base -v -run '^TestCreateTargetApi$' ``` -------------------------------- ### Change EC2-User Password Source: https://github.com/hashicorp/boundary/blob/main/enos/ipv6-aws-host.md.md Use this command to change the default password for the 'ec2-user' account on the EC2 instance. This is a necessary step before proceeding with further setup. ```bash sudo passwd ec2-user ``` -------------------------------- ### Develop E2E Tests with Enos Infrastructure Source: https://github.com/hashicorp/boundary/blob/main/testing/internal/e2e/README.md Steps to launch an Enos scenario, export its environment variables, and run specific Go tests. This aids in iterating on tests against a live Enos-provided infrastructure. ```shell cd enos ``` ```shell enos scenario launch e2e_{scenario} builder:local ``` ```shell bash scripts/test_e2e_env.sh ``` ```shell export BOUNDARY_ADDR= ``` ```shell export E2E_PASSWORD_AUTH_METHOD_ID= ``` ```shell ... ``` ```shell go test -v {go package} ``` -------------------------------- ### Execute Retryable Transaction with Updates and Oplogs Source: https://github.com/hashicorp/boundary/blob/main/internal/db/README.md Demonstrates using `DoTx` to wrap a series of writes within a retryable transaction. This includes updating a resource and writing Oplog entries with custom metadata. ```go // DoTx is a writer function that wraps a TxHandler // in a retryable transaction. You simply implement a // TxHandler that does your writes and hand the handler // to DoTx, which will wrap the writes in a retryable // transaction with the retry attempts and backoff // strategy you specify via options. _, err = w.DoTx( context.Background(), 10, // ten retries ExpBackoff{}, // exponential backoff func(w Writer) error { // the TxHandler updates the user's friendly name return w.Update(context.Background(), user, []string{"FriendlyName"}, // write oplogs for this update WithOplog( InitTestWrapper(t), oplog.Metadata{ "key-only": nil, "deployment": []string{"amex"}, "project": []string{"central-info-systems", "local-info-systems"}, }, ), ) }) ``` -------------------------------- ### Initialize PostgreSQL Dialect and GORM Connection Source: https://github.com/hashicorp/boundary/blob/main/internal/db/README.md Initializes a PostgreSQL dialect and a GORM database connection using a Data Source Name (DSN). The Db struct implements both Reader and Writer interfaces. ```go dialect = postgres.New(postgres.Config{ DSN: connectionUrl}, ) conn, _ := gorm.Open(dialect, &gorm.Config{}) // Db implements both the Reader and Writer interfaces rw := Db{Tx: conn} ``` -------------------------------- ### Trusting a Certificate on Linux Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md Save the certificate to a file and then use system commands to trust it. Ensure the certificate is named appropriately before updating. ```shell sudo cp mycert.crt /usr/local/share/ca-certificates/ sudo update-ca-certificates ``` -------------------------------- ### Run All Tests Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Executes the entire test suite after the test database container is ready. Ensure Docker is running before executing this command. ```bash $ make test ``` -------------------------------- ### Run Boundary CLI Tests (Official Version) Source: https://github.com/hashicorp/boundary/blob/main/internal/tests/cli/README.md Run the bats tests against an official Boundary version by setting the IS_VERSION environment variable. ```bash IS_VERSION=true bats -p boundary/ ``` -------------------------------- ### List Available Enos Scenarios Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md Lists all available Enos scenarios. Scenarios are typically located in the 'enos/enos-scenario*' directory. ```bash enos scenario list ``` -------------------------------- ### Run Enos Scenarios Source: https://github.com/hashicorp/boundary/blob/main/testing/internal/e2e/README.md Commands to list, run, launch, and manage Enos scenarios for Boundary E2E tests. Use `run` for execution and cleanup, `launch` to keep infrastructure for debugging. ```shell cd enos ``` ```shell enos scenario list ``` ```shell # `Run` executes the tests and destroys the associated infrastructure in one command ``` ```shell enos scenario run e2e_{scenario} builder:local ``` ```shell # `Launch` executes the tests, but leaves the infrastructure online for debugging purposes ``` ```shell enos scenario launch e2e_{scenario} builder:local ``` ```shell enos scenario output # displays any defined enos output ``` ```shell enos scenario destroy # destroys infra ``` -------------------------------- ### Monitor Test Database Logs Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Follows the logs of the running PostgreSQL test database container to monitor its initialization progress. ```bash $ docker logs -f boundary-sql-tests ``` -------------------------------- ### Launch Enos Scenario with Infrastructure Retention Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md Launches an individual Enos scenario and leaves the created infrastructure running after execution. Use 'builder:local' to test with local build artifacts. ```bash enos scenario launch e2e_aws builder:local ``` -------------------------------- ### Initialize and Apply Terraform Configuration Source: https://github.com/hashicorp/boundary/blob/main/enos/ci/hcp-resources/README.md This sequence of commands initializes Terraform, logs into Terraform Cloud, and applies the configuration to create HCP resources. Ensure you have AWS account credentials and a TFC API token. ```shell # Get AWS account credentials doormat login source <(doormat aws export --account ${AWS_ACCOUNT}) terraform login # enter TFC API token to the hashicorp-qti org terraform init terraform plan terraform apply ``` -------------------------------- ### Run API and SDK Tests Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Executes tests specifically for the SDK and API modules. These tests do not require a running test database. ```bash $ make test-api ``` ```bash $ make test-sdk ``` -------------------------------- ### Run Individual Test Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Runs a specific test case using `go test`. Replace `TestAuthTokenAuthenticator` with the desired test function name and adjust the path accordingly. ```bash $ go test -run TestAuthTokenAuthenticator -v ./internal/auth ``` -------------------------------- ### Test Different PostgreSQL Versions Source: https://github.com/hashicorp/boundary/blob/main/internal/db/sqltest/README.md Easily test against different versions of PostgreSQL by setting the PG_DOCKER_TAG make variable. ```bash make PG_DOCKER_TAG=latest ``` ```bash make PG_DOCKER_TAG=14-alpine ``` ```bash make PG_DOCKER_TAG=13-alpine ``` ```bash make PG_DOCKER_TAG=12-alpine ``` -------------------------------- ### Check PostgreSQL Container Readiness Source: https://github.com/hashicorp/boundary/blob/main/CONTRIBUTING.md Uses `pg_isready` to poll the PostgreSQL container until it is ready to accept connections. This is an alternative to monitoring logs. ```bash $ until pg_isready -h 127.0.0.1; do sleep 1; done ``` -------------------------------- ### Run Boundary CLI Tests Against Arbitrary Deployments Source: https://github.com/hashicorp/boundary/blob/main/internal/tests/cli/README.md Override environment variables to run the Boundary CLI test suite against any arbitrary cluster. Note that these tests currently expect generated resources to exist. ```bash DEFAULT_LOGIN= \ DEFAULT_PASSWORD= \ BOUNDARY_ADDR=http://boundary-test-controller-salmon-b70f2710539143b4.elb.us-east-1.amazonaws.com:9200 \ bats boundary/ ``` -------------------------------- ### Connect to a Target via SSH Source: https://github.com/hashicorp/boundary/blob/main/README.md Establishes an SSH connection to a target resource managed by Boundary. You can specify a custom username using the -username flag. ```bash boundary connect ssh -target-id ttcp_1234567890 ``` -------------------------------- ### Configure pg_prove Options Source: https://github.com/hashicorp/boundary/blob/main/internal/db/sqltest/README.md Pass through options to pg_prove for advanced test execution, such as parallel execution or verbose output. ```bash # run tests in parallel with verbose output make PROVE_OPTS='-j9 -v' ``` -------------------------------- ### Execute Terraform Module for Service User IAM Source: https://github.com/hashicorp/boundary/blob/main/enos/README.md This command sequence initializes, plans, and applies the Terraform module for setting up the CI service user IAM role and service quotas. Ensure TF_WORKSPACE, TF_TOKEN_app_terraform_io, and TF_VAR_repository environment variables are set correctly. ```shell cd ./enos/ci/service-user-iam export TF_WORKSPACE=-ci-enos-service-user-iam export TF_TOKEN_app_terraform_io= export TF_VAR_repository= terraform init terraform plan terraform apply -auto-approve ``` -------------------------------- ### Run Specific SQL Test Files Source: https://github.com/hashicorp/boundary/blob/main/internal/db/sqltest/README.md Execute individual test files or entire directories. Useful for targeted testing. ```bash # run a single test file make TESTS=tests/setup/wtt_load.sql ``` ```bash # run a single test file with the database already created. make run-tests TESTS=tests/setup/wtt_load.sql ``` ```bash # run a directory of tests make TESTS=tests/setup/*.sql ``` -------------------------------- ### Oplog Entry Structure Visualization Source: https://github.com/hashicorp/boundary/blob/main/internal/oplog/README.md Visual representation of an oplog entry, illustrating the FIFO buffer with byte arrays and the structure of messages including tags, host, typeName, and OpType. ```text Example Oplog Entry for the Target Aggregate ┌────────────────────────────────────────────────┐ │ FIFO with []byte buffer │ │ │ │┌─Msg 4────┐┌─Msg 3────┐┌─Msg 2────┐ │ ││ ││ ││ │ │ ││ Tags ││ Host ││ HostSet │ │ ││┌────────┐││┌────────┐││┌────────┐│ │ │││ ││││ ││││ ││ │ │││ ││││ ││││ ││ │ │││ Tag ││││ Host ││││HostSet ││ │ │││protobuf││││protobuf││││protobuf││ │ │││ ││││ ││││ ││ │ │││ ││││ ││││ ││ │ ││└────────┘││└────────┘││└────────┘│ │ ││┌────────┐││┌────────┐││┌────────┐│ │ │││ ││││ ││││ ││ │ │││typeName││││typeName││││typeName││ │ │││ Tag ││││ Host ││││HostSet ││ │ ││└────────┘││└────────┘││└────────┘│ │ ││┌────────┐││┌────────┐││┌────────┐│ │ │││ ││││ ││││ ││ │ │││ OpType ││││ OpType ││││ OpType ││ │ │││ Create ││││ Create ││││ Create ││ │ ││└────────┘││└────────┘││└────────┘│ │ │└──────────┘└──────────┘└──────────┘ │ └────────────────────────────────────────────────┘ ``` -------------------------------- ### Storage Bucket API Source: https://github.com/hashicorp/boundary/blob/main/internal/website/permstable/resource-table.mdx Endpoints for creating, listing, reading, updating, and deleting storage buckets. ```APIDOC ## Storage Bucket API ### Create Storage Bucket This endpoint creates a new storage bucket. ### Method POST ### Endpoint `/storage-buckets` ### Query Parameters - **type** (string) - Required - The resource type, `storage-bucket`. - **actions** (string) - Required - The action to perform, `create`. ### Success Response (201) - **(Storage bucket object)** - Details of the newly created storage bucket. ### List Storage Buckets This endpoint lists all available storage buckets. ### Method GET ### Endpoint `/storage-buckets` ### Query Parameters - **type** (string) - Required - The resource type, `storage-bucket`. - **actions** (string) - Required - The action to perform, `list`. ### Success Response (200) - **(Array of storage bucket objects)** - Details of the storage buckets. ### Read Storage Bucket This endpoint retrieves details of a specific storage bucket. ### Method GET ### Endpoint `/storage-buckets/` ### Path Parameters - **id** (string) - Required - The ID of the storage bucket. ### Query Parameters - **actions** (string) - Required - The action to perform, `read`. ### Success Response (200) - **(Storage bucket object)** - Details of the storage bucket. ### Update Storage Bucket This endpoint updates an existing storage bucket. ### Method PUT ### Endpoint `/storage-buckets/` ### Path Parameters - **id** (string) - Required - The ID of the storage bucket. ### Query Parameters - **actions** (string) - Required - The action to perform, `update`. ### Success Response (200) - **(Storage bucket object)** - Updated details of the storage bucket. ### Delete Storage Bucket This endpoint deletes a specific storage bucket. ### Method DELETE ### Endpoint `/storage-buckets/` ### Path Parameters - **id** (string) - Required - The ID of the storage bucket. ### Query Parameters - **actions** (string) - Required - The action to perform, `delete`. ### Success Response (204) - **No Content** ``` -------------------------------- ### Create Table Statement Source: https://github.com/hashicorp/boundary/blob/main/sql-style-guide.md Defines a table with columns, constraints, and a comment. Follows specific formatting for column definitions, primary keys, and constraints. ```sql create table imaginary_basket ( public_id wt_public_id primary key, store_id wt_public_id not null constraint imaginary_store_fkey references imaginary_store (public_id) on delete cascade on update cascade, basket_name text not null constraint basket_name_must_not_be_empty check( length(trim(basket_name)) > 0 ), basket_type text not null default 'fruit_basket' constraint basket_type_enm_fkey references basket_type_enm (name) on delete restrict on update cascade, constraint imaginary_basket_store_id_basket_name_uq unique(store_id, basket_name) ); comment on table imaginary_basket is 'imaginary_basket is a table where each row is a resource that represents an imaginary shopping basket.'; ``` -------------------------------- ### Create Domain Statement Source: https://github.com/hashicorp/boundary/blob/main/sql-style-guide.md Defines a custom domain with a data type and optional constraints. Check constraints are placed on new lines. ```sql create domain wt_private_id as text not null check( length(trim(value)) > 10 ); comment on domain wt_private_id is 'Random ID generated with github.com/hashicorp/go-secure-stdlib/base62'; ``` -------------------------------- ### Set Local Environment Variables for E2E Tests Source: https://github.com/hashicorp/boundary/blob/main/testing/internal/e2e/README.md Export necessary environment variables to configure Boundary and target details for local E2E testing. Ensure `E2E_TESTS` is set to `true` to enable tests. ```shell export E2E_TESTS=true # This is needed for any e2e test. Otherwise, the test is skipped ``` ```shell # For e2e/tests/base ``` ```shell export BOUNDARY_ADDR= # e.g. http://127.0.0.1:9200 ``` ```shell export E2E_PASSWORD_AUTH_METHOD_ID= # e.g. ampw_1234567890 ``` ```shell export E2E_PASSWORD_ADMIN_LOGIN_NAME= # e.g. "admin" ``` ```shell export E2E_PASSWORD_ADMIN_PASSWORD= # e.g. "password" ``` ```shell export E2E_TARGET_ADDRESS= # e.g. 192.168.0.1 ``` ```shell export E2E_TARGET_PORT= # e.g. 22 ``` ```shell export E2E_SSH_KEY_PATH= # e.g. /Users/username/key.pem ``` ```shell export E2E_SSH_USER= # e.g. ubuntu ``` ```shell # For e2e/tests/base_with_vault ``` ```shell export BOUNDARY_ADDR= # e.g. http://127.0.0.1:9200 ``` ```shell export E2E_PASSWORD_AUTH_METHOD_ID= # e.g. ampw_1234567890 ``` ```shell export E2E_PASSWORD_ADMIN_LOGIN_NAME= # e.g. "admin" ``` ```shell export E2E_PASSWORD_ADMIN_PASSWORD= # e.g. "password" ``` ```shell export VAULT_ADDR= # e.g. http://127.0.0.1:8200 ``` ```shell export VAULT_TOKEN= ``` ```shell export E2E_TARGET_ADDRESS= # e.g. 192.168.0.1 ``` ```shell export E2E_TARGET_PORT= # e.g. 22 ``` ```shell export E2E_SSH_KEY_PATH= # e.g. /Users/username/key.pem ``` ```shell export E2E_SSH_USER= # e.g. ubuntu ``` ```shell # For e2e/tests/aws ``` ```shell export BOUNDARY_ADDR= # e.g. http://127.0.0.1:9200 ``` ```shell export E2E_PASSWORD_AUTH_METHOD_ID= # e.g. ampw_1234567890 ``` ```shell export E2E_PASSWORD_ADMIN_LOGIN_NAME= # e.g. "admin" ``` ```shell export E2E_PASSWORD_ADMIN_PASSWORD= # e.g. "password" ``` ```shell export E2E_AWS_ACCESS_KEY_ID= ``` ```shell export E2E_AWS_SECRET_ACCESS_KEY= ``` ```shell export E2E_AWS_HOST_SET_FILTER= # e.g. "tag:testtag=true" ``` ```shell export E2E_AWS_HOST_SET_IPS= # e.g. "[\"1.2.3.4\", \"2.3.4.5\"]" ``` ```shell export E2E_AWS_HOST_SET_FILTER2= # e.g. "tag:testtagtwo=test" ``` ```shell export E2E_AWS_HOST_SET_IPS2= # e.g. "[\"1.2.3.4\"] ``` ```shell export E2E_SSH_KEY_PATH= # e.g. /Users/username/key.pem ``` ```shell export E2E_SSH_USER= # e.g. ubuntu ``` ```shell # For e2e/tests/database ``` ```shell export E2E_AWS_ACCESS_KEY_ID= ``` ```shell export E2E_AWS_SECRET_ACCESS_KEY= ``` ```shell export E2E_AWS_HOST_SET_FILTER= # e.g. "tag:testtag=true" ``` ```shell export VAULT_ADDR= # e.g. http://127.0.0.1:8200 ``` ```shell export VAULT_TOKEN= ``` -------------------------------- ### Host API Source: https://github.com/hashicorp/boundary/blob/main/internal/website/permstable/resource-table.mdx Endpoints for managing hosts. ```APIDOC ## Host ### Create Host **Description**: Creates a new host. **Method**: POST **Endpoint**: `/hosts` ### List Hosts **Description**: Lists all available hosts. **Method**: GET **Endpoint**: `/hosts` ### Read Host **Description**: Reads a specific host by its ID or PIN. **Method**: GET **Endpoint**: `/hosts/` ### Update Host **Description**: Updates an existing host. **Method**: PUT **Endpoint**: `/hosts/` ### Delete Host **Description**: Deletes a host. **Method**: DELETE **Endpoint**: `/hosts/` ``` -------------------------------- ### Configure Database Port Source: https://github.com/hashicorp/boundary/blob/main/internal/db/sqltest/README.md Change the default behavior of the database Docker container not using a host port by setting the SQL_TEST_DB_PORT environment variable. ```bash $ export SQL_TEST_DB_PORT=5433 $ make database-up $ make run-tests ```