paum -> ampw (#303)
This commit is contained in:
1 parent
74544f6324
commit
8f579c75c3
25 files changed
+57
-57
No files matched your search
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func TestAccounts_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -78,7 +78,7 @@ func comparableSlice(in []*authmethods.Account) []authmethods.Account {
|
||||
|
||||
func TestAccount_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -132,7 +132,7 @@ func TestAccount_Crud(t *testing.T) {
|
||||
|
||||
func TestAccount_CustomMethods(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -169,7 +169,7 @@ func TestAccount_CustomMethods(t *testing.T) {
|
||||
|
||||
func TestAccount_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
func TestAuthenticate(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func TestAuthTokens_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -82,7 +82,7 @@ func comparableSlice(in []*authtokens.AuthToken) []authtokens.AuthToken {
|
||||
|
||||
func TestAuthToken_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -117,7 +117,7 @@ func TestAuthToken_Crud(t *testing.T) {
|
||||
|
||||
func TestAuthToken_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func TestGroup_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -86,7 +86,7 @@ func comparableSlice(in []*groups.Group) []groups.Group {
|
||||
|
||||
func TestGroup_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -178,7 +178,7 @@ func TestGroup_Crud(t *testing.T) {
|
||||
|
||||
func TestGroup_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func TestCatalog_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -77,7 +77,7 @@ func comparableCatalogSlice(in []*hosts.HostCatalog) []hosts.HostCatalog {
|
||||
|
||||
func TestCatalogs_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -132,7 +132,7 @@ func TestCatalogs_Crud(t *testing.T) {
|
||||
// TODO: Get better coverage for expected errors and error formats.
|
||||
func TestCatalogs_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func TestSet_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -83,7 +83,7 @@ func comparableSetSlice(in []*hosts.HostSet) []hosts.HostSet {
|
||||
|
||||
func TestSet_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -143,7 +143,7 @@ func TestSet_Crud(t *testing.T) {
|
||||
// TODO: Get better coverage for expected errors and error formats.
|
||||
func TestSet_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
func TestHost_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -83,7 +83,7 @@ func comparableHostSlice(in []*hosts.Host) []hosts.Host {
|
||||
|
||||
func TestHost_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -143,7 +143,7 @@ func TestHost_Crud(t *testing.T) {
|
||||
// TODO: Get better coverage for expected errors and error formats.
|
||||
func TestHost_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -18,7 +18,7 @@ import (
|
||||
|
||||
func TestCustom(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -131,7 +131,7 @@ func TestCustom(t *testing.T) {
|
||||
|
||||
func TestRole_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -212,7 +212,7 @@ func comparableSlice(in []*roles.Role) []roles.Role {
|
||||
|
||||
func TestRole_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -285,7 +285,7 @@ func TestRole_Crud(t *testing.T) {
|
||||
|
||||
func TestRole_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func TestProjects_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -64,7 +64,7 @@ func comparableSlice(in []*scopes.Scope) []scopes.Scope {
|
||||
|
||||
func TestProjects_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -117,7 +117,7 @@ func TestProjects_Crud(t *testing.T) {
|
||||
// TODO: Get better coverage for expected errors and error formats.
|
||||
func TestProject_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func TestUsers_List(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -76,7 +76,7 @@ func comparableSlice(in []*users.User) []users.User {
|
||||
|
||||
func TestUser_Crud(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
@@ -129,7 +129,7 @@ func TestUser_Crud(t *testing.T) {
|
||||
|
||||
func TestUser_Errors(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
tc := controller.NewTestController(t, &controller.TestControllerOpts{
|
||||
DisableAuthorizationFailures: true,
|
||||
DefaultAuthMethodId: amId,
|
||||
|
||||
@@ -8,8 +8,8 @@ import (
|
||||
|
||||
// PublicId prefixes for the resources in the password package.
|
||||
const (
|
||||
AuthMethodPrefix = "paum"
|
||||
AccountPrefix = "pacc"
|
||||
AuthMethodPrefix = "ampw"
|
||||
AccountPrefix = "apw"
|
||||
)
|
||||
|
||||
func newAuthMethodId() (string, error) {
|
||||
|
||||
@@ -76,7 +76,7 @@ func TestRepository_CreateAccount(t *testing.T) {
|
||||
in: &Account{
|
||||
Account: &store.Account{
|
||||
AuthMethodId: authMethod.PublicId,
|
||||
PublicId: "sthc_OOOOOOOOOO",
|
||||
PublicId: "hcst_OOOOOOOOOO",
|
||||
},
|
||||
},
|
||||
wantIsErr: db.ErrInvalidParameter,
|
||||
|
||||
@@ -56,7 +56,7 @@ func TestRepository_CreateAuthMethod(t *testing.T) {
|
||||
in: &AuthMethod{
|
||||
AuthMethod: &store.AuthMethod{
|
||||
ScopeId: org.PublicId,
|
||||
PublicId: "sthc_OOOOOOOOOO",
|
||||
PublicId: "hcst_OOOOOOOOOO",
|
||||
},
|
||||
},
|
||||
wantIsErr: db.ErrInvalidParameter,
|
||||
|
||||
@@ -498,7 +498,7 @@ func (b *Server) CreateDevDatabase(dialect string) error {
|
||||
}
|
||||
amId := b.DevAuthMethodId
|
||||
if amId == "" {
|
||||
amId = "paum_1234567890"
|
||||
amId = "ampw_1234567890"
|
||||
}
|
||||
_, err = pwRepo.CreateAuthMethod(ctx, authMethod, password.WithPublicId(amId))
|
||||
if err != nil {
|
||||
|
||||
@@ -43,7 +43,7 @@ func (c *PasswordCommand) Help() string {
|
||||
"",
|
||||
" Invoke the password auth method to authenticate the Boundary CLI:",
|
||||
"",
|
||||
` $ boundary authenticate password -auth-method-id paum_1234567890 -login-name foo -password "bar"`,
|
||||
` $ boundary authenticate password -auth-method-id ampw_1234567890 -login-name foo -password "bar"`,
|
||||
}) + c.Flags().Help()
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ func (c *Command) Help() string {
|
||||
"",
|
||||
" Read an auth-method:",
|
||||
"",
|
||||
` $ boundary auth-methods read -id paum_1234567890`,
|
||||
` $ boundary auth-methods read -id ampw_1234567890`,
|
||||
"",
|
||||
" Please see the auth-methods subcommand help for detailed usage information.",
|
||||
})
|
||||
|
||||
@@ -56,7 +56,7 @@ func (c *PasswordCommand) Help() string {
|
||||
"",
|
||||
" Update a password-type auth-method given its ID. Example:",
|
||||
"",
|
||||
` $ boundary auth-methods password update -id paum_1234567890 -name "devops" -description "Password auth-method for DevOps"`,
|
||||
` $ boundary auth-methods password update -id ampw_1234567890 -name "devops" -description "Password auth-method for DevOps"`,
|
||||
"",
|
||||
"",
|
||||
})
|
||||
|
||||
@@ -15,7 +15,7 @@ func ExampleNewHostCatalog() {
|
||||
}
|
||||
|
||||
func ExampleNewHost() {
|
||||
catalogPublicId := "sthc_1234"
|
||||
catalogPublicId := "hcst_1234"
|
||||
host, _ := static.NewHost(catalogPublicId, static.WithAddress("127.0.0.1"))
|
||||
fmt.Println(host.Address)
|
||||
// Output:
|
||||
@@ -23,7 +23,7 @@ func ExampleNewHost() {
|
||||
}
|
||||
|
||||
func ExampleNewHostSet() {
|
||||
catalogPublicId := "sthc_1234"
|
||||
catalogPublicId := "hcst_1234"
|
||||
set, _ := static.NewHostSet(catalogPublicId, static.WithName("my host set"))
|
||||
fmt.Println(set.Name)
|
||||
// Output:
|
||||
@@ -31,8 +31,8 @@ func ExampleNewHostSet() {
|
||||
}
|
||||
|
||||
func ExampleNewHostSetMember() {
|
||||
setPublicId := "sths_11111"
|
||||
hostPublicId := "sth_22222"
|
||||
setPublicId := "hsst_11111"
|
||||
hostPublicId := "hst_22222"
|
||||
member, _ := static.NewHostSetMember(setPublicId, hostPublicId)
|
||||
fmt.Println(member.SetId)
|
||||
fmt.Println(member.HostId)
|
||||
|
||||
@@ -262,7 +262,7 @@ func TestStaticHostSetMember_ImmutableFields(t *testing.T) {
|
||||
name: "host_id",
|
||||
update: func() *HostSetMember {
|
||||
c := new.testCloneHostSetMember()
|
||||
c.HostId = "sth_01234567890"
|
||||
c.HostId = "hst_01234567890"
|
||||
return c
|
||||
}(),
|
||||
fieldMask: []string{"HostId"},
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
// PublicId prefixes for the resources in the static package.
|
||||
const (
|
||||
HostCatalogPrefix = "sthc"
|
||||
HostSetPrefix = "sths"
|
||||
HostPrefix = "sth"
|
||||
HostCatalogPrefix = "hcst"
|
||||
HostSetPrefix = "hsst"
|
||||
HostPrefix = "hst"
|
||||
)
|
||||
|
||||
func newHostCatalogId() (string, error) {
|
||||
|
||||
@@ -95,7 +95,7 @@ func TestRepository_CreateCatalog(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
assert.Empty(tt.in.PublicId)
|
||||
assert.NotNil(got)
|
||||
assertPublicId(t, "sthc", got.PublicId)
|
||||
assertPublicId(t, "hcst", got.PublicId)
|
||||
assert.NotSame(tt.in, got)
|
||||
assert.Equal(tt.want.Name, got.Name)
|
||||
assert.Equal(tt.want.Description, got.Description)
|
||||
@@ -120,7 +120,7 @@ func TestRepository_CreateCatalog(t *testing.T) {
|
||||
got, err := repo.CreateCatalog(context.Background(), in)
|
||||
assert.NoError(err)
|
||||
assert.NotNil(got)
|
||||
assertPublicId(t, "sthc", got.PublicId)
|
||||
assertPublicId(t, "hcst", got.PublicId)
|
||||
assert.NotSame(in, got)
|
||||
assert.Equal(in.Name, got.Name)
|
||||
assert.Equal(in.Description, got.Description)
|
||||
@@ -149,7 +149,7 @@ func TestRepository_CreateCatalog(t *testing.T) {
|
||||
got, err := repo.CreateCatalog(context.Background(), in)
|
||||
assert.NoError(err)
|
||||
assert.NotNil(got)
|
||||
assertPublicId(t, "sthc", got.PublicId)
|
||||
assertPublicId(t, "hcst", got.PublicId)
|
||||
assert.NotSame(in, got)
|
||||
assert.Equal(in.Name, got.Name)
|
||||
assert.Equal(in.Description, got.Description)
|
||||
@@ -159,7 +159,7 @@ func TestRepository_CreateCatalog(t *testing.T) {
|
||||
got2, err := repo.CreateCatalog(context.Background(), in2)
|
||||
assert.NoError(err)
|
||||
assert.NotNil(got2)
|
||||
assertPublicId(t, "sthc", got2.PublicId)
|
||||
assertPublicId(t, "hcst", got2.PublicId)
|
||||
assert.NotSame(in2, got2)
|
||||
assert.Equal(in2.Name, got2.Name)
|
||||
assert.Equal(in2.Description, got2.Description)
|
||||
@@ -215,7 +215,7 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
|
||||
nonExistentPublicId := func() func(*HostCatalog) *HostCatalog {
|
||||
return func(c *HostCatalog) *HostCatalog {
|
||||
c.PublicId = "sthc_OOOOOOOOOO"
|
||||
c.PublicId = "hcst_OOOOOOOOOO"
|
||||
return c
|
||||
}
|
||||
}
|
||||
@@ -457,7 +457,7 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
assert.NoError(err)
|
||||
assert.Empty(tt.orig.PublicId)
|
||||
assert.NotNil(got)
|
||||
assertPublicId(t, "sthc", got.PublicId)
|
||||
assertPublicId(t, "hcst", got.PublicId)
|
||||
assert.Equal(tt.wantCount, gotCount, "row count")
|
||||
assert.NotSame(tt.orig, got)
|
||||
assert.Equal(tt.orig.ScopeId, got.ScopeId)
|
||||
@@ -519,7 +519,7 @@ func TestRepository_UpdateCatalog(t *testing.T) {
|
||||
got, err := repo.CreateCatalog(context.Background(), in)
|
||||
assert.NoError(err)
|
||||
assert.NotNil(got)
|
||||
assertPublicId(t, "sthc", got.PublicId)
|
||||
assertPublicId(t, "hcst", got.PublicId)
|
||||
assert.NotSame(in, got)
|
||||
assert.Equal(in.Name, got.Name)
|
||||
assert.Equal(in.Description, got.Description)
|
||||
|
||||
@@ -21,7 +21,7 @@ func TestAuthenticationHandler(t *testing.T) {
|
||||
})
|
||||
defer c.Shutdown()
|
||||
|
||||
resp, err := http.Post(fmt.Sprintf("%s/v1/scopes/%s/auth-methods/paum_1234567890:authenticate", c.ApiAddrs()[0], scope.Global.String()), "application/json",
|
||||
resp, err := http.Post(fmt.Sprintf("%s/v1/scopes/%s/auth-methods/ampw_1234567890:authenticate", c.ApiAddrs()[0], scope.Global.String()), "application/json",
|
||||
strings.NewReader(`{"token_type": null, "credentials": {"login_name":"admin", "password": "password123"}}`))
|
||||
require.NoError(t, err)
|
||||
assert.Equal(t, http.StatusOK, resp.StatusCode, "Got response: %v", resp)
|
||||
|
||||
@@ -391,7 +391,7 @@ func TestCreate(t *testing.T) {
|
||||
assert.Equal(tc.errCode, status.Code(gErr), "CreateHostSet(%+v) got error %v, wanted %v", req, gErr, tc.errCode)
|
||||
if got != nil {
|
||||
assert.Contains(got.GetUri(), tc.res.GetUri())
|
||||
assert.True(strings.HasPrefix(got.GetItem().GetId(), static.HostPrefix))
|
||||
assert.True(strings.HasPrefix(got.GetItem().GetId(), static.HostSetPrefix), got.GetItem().GetId())
|
||||
gotCreateTime, err := ptypes.Timestamp(got.GetItem().GetCreatedTime())
|
||||
require.NoError(err, "Error converting proto to timestamp.")
|
||||
gotUpdateTime, err := ptypes.Timestamp(got.GetItem().GetUpdatedTime())
|
||||
|
||||
@@ -15,7 +15,7 @@ import (
|
||||
|
||||
func TestAuthenticationMulti(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
user := "user"
|
||||
password := "passpass"
|
||||
logger := hclog.New(&hclog.LoggerOptions{
|
||||
|
||||
@@ -13,7 +13,7 @@ import (
|
||||
|
||||
func TestMultiControllerMultiWorkerConnections(t *testing.T) {
|
||||
assert, require := assert.New(t), require.New(t)
|
||||
amId := "paum_1234567890"
|
||||
amId := "ampw_1234567890"
|
||||
user := "user"
|
||||
password := "passpass"
|
||||
logger := hclog.New(&hclog.LoggerOptions{
|
||||
|
||||
Reference in new issue
Block a user