Update sdk dep from proper branch and fix building
This commit is contained in:
1 parent
158ab09952
commit
098c3e1f22
7 files changed
+13
-16
No files matched your search
@@ -25,7 +25,7 @@ require (
|
||||
github.com/hashicorp/boundary-plugin-host-aws v0.0.0-20210928175609-6345faccf578
|
||||
github.com/hashicorp/boundary-plugin-host-azure v0.0.0-20210930043837-3542fae64d2e
|
||||
github.com/hashicorp/boundary/api v0.0.19
|
||||
github.com/hashicorp/boundary/sdk v0.0.11-0.20210928201932-8b1ca4b0b8b9
|
||||
github.com/hashicorp/boundary/sdk v0.0.12-0.20211005202728-158ab09952ba
|
||||
github.com/hashicorp/cap v0.1.1
|
||||
github.com/hashicorp/dawdle v0.4.0
|
||||
github.com/hashicorp/dbassert v0.0.0-20210708202608-ecf920cf1ed8
|
||||
@@ -56,7 +56,6 @@ require (
|
||||
github.com/jackc/pgconn v1.10.0
|
||||
github.com/jackc/pgx/v4 v4.11.0
|
||||
github.com/jefferai/keyring v1.1.7-0.20210105022822-8749b3d9ce79
|
||||
github.com/jinzhu/gorm v1.9.12
|
||||
github.com/kr/pretty v0.3.0
|
||||
github.com/kr/text v0.2.0
|
||||
github.com/mattn/go-colorable v0.1.8
|
||||
|
||||
@@ -77,7 +77,7 @@ func Test_PreferredEndpointTable(t *testing.T) {
|
||||
condition: "dns:abcd",
|
||||
},
|
||||
},
|
||||
wantErrContains: "priority must not be empty",
|
||||
wantErrContains: "priority_must_be_greater_than_zero",
|
||||
},
|
||||
{
|
||||
testName: "duplicate priority",
|
||||
|
||||
@@ -2,6 +2,7 @@ package plugin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/db"
|
||||
"github.com/hashicorp/boundary/internal/errors"
|
||||
@@ -92,9 +93,9 @@ func (c *HostCatalogSecret) decrypt(ctx context.Context, cipher wrapping.Wrapper
|
||||
func (c *HostCatalogSecret) insertQuery() (query string, queryValues []interface{}) {
|
||||
query = upsertHostCatalogSecretQuery
|
||||
queryValues = []interface{}{
|
||||
c.CatalogId,
|
||||
c.CtSecret,
|
||||
c.KeyId,
|
||||
sql.Named("catalog_id", c.CatalogId),
|
||||
sql.Named("secret", c.CtSecret),
|
||||
sql.Named("key_id", c.KeyId),
|
||||
}
|
||||
return
|
||||
}
|
||||
@@ -102,7 +103,7 @@ func (c *HostCatalogSecret) insertQuery() (query string, queryValues []interface
|
||||
func (c *HostCatalogSecret) deleteQuery() (query string, queryValues []interface{}) {
|
||||
query = deleteHostCatalogSecretQuery
|
||||
queryValues = []interface{}{
|
||||
c.CatalogId,
|
||||
sql.Named("catalog_id", c.CatalogId),
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ const (
|
||||
insert into host_plugin_catalog_secret
|
||||
(catalog_id, secret, key_id)
|
||||
values
|
||||
($1, $2, $3)
|
||||
(@catalog_id, @secret, @key_id)
|
||||
on conflict (catalog_id) do update
|
||||
set secret = excluded.secret,
|
||||
key_id = excluded.key_id
|
||||
@@ -14,6 +14,6 @@ returning *;
|
||||
|
||||
deleteHostCatalogSecretQuery = `
|
||||
delete from host_plugin_catalog_secret
|
||||
where catalog_id = $1;
|
||||
where catalog_id = @catalog_id;
|
||||
`
|
||||
)
|
||||
@@ -8,7 +8,6 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/kms"
|
||||
"github.com/hashicorp/boundary/internal/plugin/host"
|
||||
plgpb "github.com/hashicorp/boundary/sdk/pbs/plugin"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
@@ -16,7 +15,7 @@ import (
|
||||
// TestCatalog creates count number of plugin host catalogs to the provided DB
|
||||
// with the provided scope id. If any errors are encountered during the creation of
|
||||
// the host catalog, the test will fail.
|
||||
func TestCatalog(t *testing.T, conn *gorm.DB, scopeId, pluginId string, opt ...Option) *HostCatalog {
|
||||
func TestCatalog(t *testing.T, conn *db.DB, scopeId, pluginId string, opt ...Option) *HostCatalog {
|
||||
t.Helper()
|
||||
ctx := context.Background()
|
||||
w := db.New(conn)
|
||||
@@ -41,7 +40,7 @@ func TestCatalog(t *testing.T, conn *gorm.DB, scopeId, pluginId string, opt ...O
|
||||
// TestSet creates a plugin host sets in the provided DB
|
||||
// with the provided catalog id. The catalog must have been created
|
||||
// previously. The test will fail if any errors are encountered.
|
||||
func TestSet(t *testing.T, conn *gorm.DB, kmsCache *kms.Kms, hc *HostCatalog, plgm map[string]plgpb.HostPluginServiceServer, opt ...Option) *HostSet {
|
||||
func TestSet(t *testing.T, conn *db.DB, kmsCache *kms.Kms, hc *HostCatalog, plgm map[string]plgpb.HostPluginServiceServer, opt ...Option) *HostSet {
|
||||
t.Helper()
|
||||
require := require.New(t)
|
||||
ctx := context.Background()
|
||||
|
||||
@@ -5,11 +5,10 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/hashicorp/boundary/internal/db"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestPlugin(t *testing.T, conn *gorm.DB, name string) *Plugin {
|
||||
func TestPlugin(t *testing.T, conn *db.DB, name string) *Plugin {
|
||||
t.Helper()
|
||||
p := NewPlugin(WithName(name))
|
||||
id, err := newPluginId()
|
||||
|
||||
@@ -7,7 +7,6 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/db"
|
||||
"github.com/hashicorp/boundary/internal/plugin/store"
|
||||
"github.com/hashicorp/boundary/internal/types/scope"
|
||||
"github.com/jinzhu/gorm"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
@@ -42,7 +41,7 @@ func (c *plugin) SetTableName(n string) {
|
||||
c.tableName = n
|
||||
}
|
||||
|
||||
func testPlugin(t *testing.T, conn *gorm.DB, name string) *plugin {
|
||||
func testPlugin(t *testing.T, conn *db.DB, name string) *plugin {
|
||||
t.Helper()
|
||||
p := newPlugin(name)
|
||||
id, err := db.NewPublicId("plg")
|
||||
|
||||
Reference in new issue
Block a user