mirror of
https://github.com/pomerium/pomerium.git
synced 2025-07-06 03:18:03 +02:00
Merge branch 'main' into wasaga/healthcheck-reporter
This commit is contained in:
commit
a38a21a225
33 changed files with 133 additions and 219 deletions
|
@ -11,9 +11,7 @@ import (
|
|||
"github.com/pomerium/pomerium/pkg/protoutil"
|
||||
)
|
||||
|
||||
var (
|
||||
sessionTypeURL = protoutil.GetTypeURL(new(session.Session))
|
||||
)
|
||||
var sessionTypeURL = protoutil.GetTypeURL(new(session.Session))
|
||||
|
||||
// CurrentUsers returns a list of users active within the current UTC day
|
||||
func CurrentUsers(
|
||||
|
|
|
@ -26,7 +26,6 @@ func (e *RequestIDError) Unwrap() error {
|
|||
|
||||
// Is implements errors.Is for RequestIDError
|
||||
func (e *RequestIDError) Is(err error) bool {
|
||||
//nolint:errorlint
|
||||
_, ok := err.(*RequestIDError)
|
||||
return ok
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ func (e *terminalError) Unwrap() error {
|
|||
|
||||
// Is implements errors.Is for terminalError
|
||||
func (e *terminalError) Is(err error) bool {
|
||||
//nolint:errorlint
|
||||
_, ok := err.(*terminalError)
|
||||
return ok
|
||||
}
|
||||
|
|
|
@ -46,7 +46,7 @@ func SaveBootstrapConfigToFile(src *cluster_api.BootstrapConfig, fp string, ciph
|
|||
}
|
||||
|
||||
ciphertext := cryptutil.Encrypt(cipher, plaintext, nil)
|
||||
err = os.WriteFile(fp, ciphertext, 0600)
|
||||
err = os.WriteFile(fp, ciphertext, 0o600)
|
||||
if err != nil {
|
||||
return fmt.Errorf("write bootstrap config: %w", err)
|
||||
}
|
||||
|
|
|
@ -12,16 +12,12 @@ import (
|
|||
cluster_api "github.com/pomerium/pomerium/pkg/zero/cluster"
|
||||
)
|
||||
|
||||
var (
|
||||
_ = config.Source(new(source))
|
||||
)
|
||||
var _ = config.Source(new(source))
|
||||
|
||||
var (
|
||||
cmpOpts = []cmp.Option{
|
||||
cmpopts.IgnoreUnexported(config.Options{}),
|
||||
cmpopts.EquateEmpty(),
|
||||
}
|
||||
)
|
||||
var cmpOpts = []cmp.Option{
|
||||
cmpopts.IgnoreUnexported(config.Options{}),
|
||||
cmpopts.EquateEmpty(),
|
||||
}
|
||||
|
||||
type source struct {
|
||||
cfg atomicutil.Value[*config.Config]
|
||||
|
|
|
@ -16,7 +16,6 @@ import (
|
|||
)
|
||||
|
||||
func TestReadRecords(t *testing.T) {
|
||||
|
||||
dir := t.TempDir()
|
||||
fd, err := os.CreateTemp(dir, "config")
|
||||
require.NoError(t, err)
|
||||
|
@ -34,7 +33,7 @@ func TestReadRecords(t *testing.T) {
|
|||
}
|
||||
|
||||
func writeSampleRecords(dst io.Writer) error {
|
||||
var marshalOpts = protodelim.MarshalOptions{
|
||||
marshalOpts := protodelim.MarshalOptions{
|
||||
MarshalOptions: proto.MarshalOptions{
|
||||
AllowPartial: false,
|
||||
Deterministic: true,
|
||||
|
|
|
@ -73,7 +73,6 @@ func TestQueueMarkForSyncLater(t *testing.T) {
|
|||
assert.Equal(t, "bundle1", id4)
|
||||
assert.False(t, ok5, "Expected no more bundles to sync")
|
||||
assert.Empty(t, id5)
|
||||
|
||||
}
|
||||
|
||||
func TestQueueGetNextBundleToSync(t *testing.T) {
|
||||
|
|
|
@ -37,10 +37,8 @@ const (
|
|||
BundleCacheEntryRecordType = "pomerium.io/BundleCacheEntry"
|
||||
)
|
||||
|
||||
var (
|
||||
// ErrBundleCacheEntryNotFound is returned when a bundle cache entry is not found
|
||||
ErrBundleCacheEntryNotFound = errors.New("bundle cache entry not found")
|
||||
)
|
||||
// ErrBundleCacheEntryNotFound is returned when a bundle cache entry is not found
|
||||
var ErrBundleCacheEntryNotFound = errors.New("bundle cache entry not found")
|
||||
|
||||
// GetBundleCacheEntry gets a bundle cache entry from the databroker
|
||||
func (c *service) GetBundleCacheEntry(ctx context.Context, id string) (*BundleCacheEntry, error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue