-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into dependabot/github_actions/actions/setup-node…
…-4.0.3
- Loading branch information
Showing
40 changed files
with
948 additions
and
257 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
sdk/helper: Allow setting environment variables when using NewTestDockerCluster | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
package docker | ||
|
||
import ( | ||
"testing" | ||
) | ||
|
||
func TestSettingEnvsToContainer(t *testing.T) { | ||
expectedEnv := "TEST_ENV=value1" | ||
expectedEnv2 := "TEST_ENV2=value2" | ||
opts := &DockerClusterOptions{ | ||
ImageRepo: "hashicorp/vault", | ||
ImageTag: "latest", | ||
Envs: []string{expectedEnv, expectedEnv2}, | ||
} | ||
cluster := NewTestDockerCluster(t, opts) | ||
defer cluster.Cleanup() | ||
|
||
envs := cluster.GetActiveClusterNode().Container.Config.Env | ||
|
||
if !findEnv(envs, expectedEnv) { | ||
t.Errorf("Missing ENV variable: %s", expectedEnv) | ||
} | ||
if !findEnv(envs, expectedEnv2) { | ||
t.Errorf("Missing ENV variable: %s", expectedEnv2) | ||
} | ||
} | ||
|
||
func findEnv(envs []string, env string) bool { | ||
for _, e := range envs { | ||
if e == env { | ||
return true | ||
} | ||
} | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** | ||
* Copyright (c) HashiCorp, Inc. | ||
* SPDX-License-Identifier: BUSL-1.1 | ||
*/ | ||
|
||
export { default } from 'core/helpers/date-from-now'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
{{! | ||
Copyright (c) HashiCorp, Inc. | ||
SPDX-License-Identifier: BUSL-1.1 | ||
~}} | ||
|
||
<div data-test-overview-card-container="Paths" ...attributes> | ||
<Hds::Text::Display @weight="semibold" @size="300" @tag="h2"> | ||
Paths | ||
</Hds::Text::Display> | ||
{{#if @isCondensed}} | ||
<Hds::Text::Body @tag="p" @color="faint"> | ||
The paths to use when referring to this secret in API or CLI. | ||
</Hds::Text::Body> | ||
{{/if}} | ||
|
||
<div class="box is-fullwidth is-sideless is-paddingless is-marginless {{if @isCondensed 'is-shadowless'}} "> | ||
{{#each this.paths as |path|}} | ||
<InfoTableRow | ||
@label={{path.label}} | ||
@labelWidth={{if @isCondensed "is-one-quarter" "is-one-third"}} | ||
@helperText={{if @isCondensed "" path.text}} | ||
@truncateValue={{true}} | ||
> | ||
<Hds::Copy::Button | ||
@text="Copy" | ||
@isIconOnly={{true}} | ||
@textToCopy={{path.snippet}} | ||
@onError={{fn (set-flash-message "Clipboard copy failed. The Clipboard API requires a secure context." "danger")}} | ||
data-test-copy-button={{path.snippet}} | ||
class="transparent" | ||
/> | ||
<code class="is-flex-1 text-overflow-ellipsis has-left-margin-s"> | ||
{{path.snippet}} | ||
</code> | ||
</InfoTableRow> | ||
{{/each}} | ||
</div> | ||
|
||
{{#unless @isCondensed}} | ||
<Hds::Text::Display @weight="semibold" @size="300" @tag="h3" class="has-top-margin-xl"> | ||
Commands | ||
</Hds::Text::Display> | ||
|
||
<div class="box is-fullwidth is-sideless"> | ||
<h3 class="is-label"> | ||
CLI | ||
<Hds::Badge @text="kv get" @color="neutral" /> | ||
</h3> | ||
<p class="helper-text has-text-grey-light has-bottom-padding-s"> | ||
This command retrieves the value from KV secrets engine at the given key name. See our | ||
<Hds::Link::Inline @isHrefExternal={{true}} @href={{doc-link "/vault/docs/commands/kv"}}> | ||
documentation</Hds::Link::Inline> | ||
for other CLI commands. | ||
</p> | ||
<Hds::CodeBlock | ||
data-test-commands="cli" | ||
@language="bash" | ||
@hasLineNumbers={{false}} | ||
@hasCopyButton={{true}} | ||
@value={{this.commands.cli}} | ||
/> | ||
|
||
<h3 class="has-top-margin-l is-label"> | ||
API read secret version | ||
</h3> | ||
<p class="helper-text has-text-grey-light has-bottom-padding-s"> | ||
This command obtains data and metadata for the latest version of this secret. In this example, Vault is located at | ||
https://127.0.0.1:8200. For other API commands, | ||
<DocLink @path="/vault/api-docs/secret/kv/kv-v2"> | ||
learn more. | ||
</DocLink> | ||
</p> | ||
<Hds::CodeBlock | ||
data-test-commands="api" | ||
@language="bash" | ||
@hasLineNumbers={{false}} | ||
@hasCopyButton={{true}} | ||
@value={{this.commands.api}} | ||
/> | ||
</div> | ||
{{/unless}} | ||
</div> |
Oops, something went wrong.