MCPcopy Index your code
hub / github.com/coder/coder / setup

Function setup

enterprise/dbcrypt/dbcrypt_internal_test.go:854–863  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

852}
853
854func setup(t *testing.T) (db database.Store, cryptDB *dbCrypt, cs []Cipher) {
855 t.Helper()
856 rawDB, _ := dbtestutil.NewDB(t)
857 cs = append(cs, initCipher(t))
858 cdb, err := New(context.Background(), rawDB, cs...)
859 require.NoError(t, err)
860 cryptDB, ok := cdb.(*dbCrypt)
861 require.True(t, ok)
862 return rawDB, cryptDB, cs
863}
864
865func setupNoCiphers(t *testing.T) (db database.Store, cryptodb *dbCrypt) {
866 t.Helper()

Callers 11

TestUserLinksFunction · 0.70
TestExternalAuthLinksFunction · 0.70
TestCryptoKeysFunction · 0.70
TestEncryptDecryptFieldFunction · 0.70
TestMCPServerConfigsFunction · 0.70
TestAIProvidersFunction · 0.70
TestAIProviderKeysFunction · 0.70
TestUserAIProviderKeysFunction · 0.70
TestMCPServerUserTokensFunction · 0.70
TestUserSecretsFunction · 0.70

Calls 4

NewDBFunction · 0.92
initCipherFunction · 0.85
NewFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected