Files
threshold/internal/bsr/testing.go
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

75 lines
1.6 KiB
Go
Raw Normal View History

2023-05-03 09:11:52 -04:00
// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package bsr
func TestSessionRecordingMeta(s string, p Protocol) *SessionRecordingMeta {
return &SessionRecordingMeta{
2023-05-03 09:11:52 -04:00
Id: s,
Protocol: p,
}
}
func TestSessionMeta(s string) *SessionMeta {
return &SessionMeta{
PublicId: s,
2023-05-25 14:40:12 -07:00
Endpoint: "myhost:12345",
2023-05-03 09:11:52 -04:00
User: &User{
PublicId: "user123",
Scope: Scope{
PublicId: "global",
Type: "global",
},
2023-05-03 09:11:52 -04:00
},
StaticHost: &StaticHost{
PublicId: "host123",
Catalog: StaticHostCatalog{
PublicId: "staticcat123",
ProjectId: "proj123",
},
Address: "127.0.0.1",
2023-05-03 09:11:52 -04:00
},
Target: &Target{
2023-05-18 16:27:15 -07:00
PublicId: "target123",
Scope: Scope{
PublicId: "proj123",
Type: "project",
ParentId: "org123",
},
2023-05-03 09:11:52 -04:00
DefaultPort: 0,
SessionMaxSeconds: 0,
SessionConnectionLimit: 0,
},
Worker: &Worker{
PublicId: "w_12345",
Version: "0.25.5",
Sha: "beepboopgitsha",
},
StaticJSONCredentials: []StaticJsonCredential{
{
PublicId: "scjson123",
ObjectHmac: []byte("hmac"),
CredentialStore: StaticCredentialStore{
PublicId: "scs123",
ProjectId: "proj123",
},
},
},
VaultGenericLibraries: []VaultGenericLibrary{
{
PublicId: "vl123",
VaultPath: "/a/path",
HttpMethod: "GET",
CredentialType: "magic",
CredentialStore: VaultCredentialStore{
PublicId: "vcs123",
ProjectId: "proj123",
VaultAddress: "an/address",
Namespace: "name",
TlsServerName: "imaserver",
TlsSkipVerify: false,
},
},
},
2023-05-03 09:11:52 -04:00
}
}