Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions builtin/logical/database/backend_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1665,8 +1665,8 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
cassandraConfig,
},
expectedCounts: map[string]int{
pluginconsts.DbPostgresqlPlugin: 1,
pluginconsts.DbCassandraPlugin: 1,
pluginconsts.DbPostgresqlPluginType: 1,
pluginconsts.DbCassandraPluginType: 1,
},
},
{
Expand All @@ -1675,7 +1675,7 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
postgresConfig,
},
expectedCounts: map[string]int{
pluginconsts.DbPostgresqlPlugin: 1,
pluginconsts.DbPostgresqlPluginType: 1,
},
},
{
Expand All @@ -1692,8 +1692,8 @@ func TestBackend_GetConnectionMetrics(t *testing.T) {
cassandraConfigV2,
},
expectedCounts: map[string]int{
pluginconsts.DbPostgresqlPlugin: 2,
pluginconsts.DbCassandraPlugin: 2,
pluginconsts.DbPostgresqlPluginType: 2,
pluginconsts.DbCassandraPluginType: 2,
},
},
}
Expand Down
26 changes: 18 additions & 8 deletions helper/pluginconsts/plugin_consts.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ const (
AuthTypeSAML = "saml"
AuthTypeApprole = "approle"
AuthTypeJWT = "jwt"
DbCassandraPlugin = "cassandra"
DbHanaPlugin = "hdb"
DbInfluxDBPlugin = "influxdb"
DbMongoDBPlugin = "mongodb"
DbMsSQLPlugin = "mssql"
DbMySQLPlugin = "mysql"
DbRedshiftPlugin = "redshift"
DbPostgresqlPlugin = "pgx"
SecretEngineAD = "ad"
SecretEngineAlicloud = "alicloud"
SecretEngineAWS = "aws"
Expand Down Expand Up @@ -71,3 +63,21 @@ const (
// database type for every database.
SecretEngineDatabase = "database"
)

// These DB consts match the type returned from database plugin's Type() method.
const (
DbCassandraPluginType = "cassandra"
DbCouchbasePluginType = "couchbase"
DbElasticSearchPluginType = "elasticsearch"
DbHanaPluginType = "hdb"
DbInfluxDBPluginType = "influxdb"
DbMongoDBPluginType = "mongodb"
DbMongoAtlasPluginType = "mongodbatlas"
DbMsSQLPluginType = "mssql"
DbMySQLPluginType = "mysql"
DbPostgresqlPluginType = "pgx"
DbRedshiftPluginType = "redshift"
DbRedisPluginType = "redis"
DbRedisElasticachePluginType = "redisElastiCache"
DbSnowflakePluginType = "snowflake"
)
1 change: 1 addition & 0 deletions vault/mount.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ const (
mountTypeNSCubbyhole = "ns_cubbyhole"
mountTypeToken = "token"
mountTypeNSToken = "ns_token"
mountTypeDatabase = "database"

MountTableUpdateStorage = true
MountTableNoUpdateStorage = false
Expand Down
Loading