mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 19:44:21 +00:00
23 lines
599 B
Go
23 lines
599 B
Go
|
package bucket
|
||
|
|
||
|
import (
|
||
|
"github.com/caos/orbos/pkg/secret"
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
"testing"
|
||
|
)
|
||
|
|
||
|
func TestBucket_getSecretsFull(t *testing.T) {
|
||
|
secrets := getSecretsMap(&desired)
|
||
|
assert.Equal(t, desired.Spec.ServiceAccountJSON, secrets["serviceaccountjson"])
|
||
|
}
|
||
|
|
||
|
func TestBucket_getSecretsEmpty(t *testing.T) {
|
||
|
secrets := getSecretsMap(&desiredWithoutSecret)
|
||
|
assert.Equal(t, &secret.Secret{}, secrets["serviceaccountjson"])
|
||
|
}
|
||
|
|
||
|
func TestBucket_getSecretsNil(t *testing.T) {
|
||
|
secrets := getSecretsMap(&desiredNil)
|
||
|
assert.Equal(t, &secret.Secret{}, secrets["serviceaccountjson"])
|
||
|
}
|