Skip to content

Commit 03aa1a1

Browse files
committed
Fix commented out test
1 parent e87345a commit 03aa1a1

File tree

3 files changed

+5
-19
lines changed

3 files changed

+5
-19
lines changed

internal/onepassword/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ func NewClient(ctx context.Context, config ClientConfig) (Client, error) {
4141
ProviderUserAgent: config.ProviderUserAgent,
4242
}), nil
4343
}
44-
return nil, errors.New("Invalid provider configuration. Either Connect credentials (\"connect_token\" and \"connect_url\") or Service Account (\"service_account_token\" or \"account\") credentials should be set.")
44+
return nil, errors.New("Invalid provider configuration. Either Connect credentials (\"connect_token\" and \"connect_url\") or Service Account (\"service_account_token\") or \"account\" should be set.")
4545
}

internal/provider/provider.go

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -52,25 +52,11 @@ func (p *OnePasswordProvider) Schema(ctx context.Context, req provider.SchemaReq
5252
"connect_url": schema.StringAttribute{
5353
MarkdownDescription: "The HTTP(S) URL where your 1Password Connect server can be found. Can also be sourced `OP_CONNECT_HOST` environment variable. Provider will use 1Password Connect server if set.",
5454
Optional: true,
55-
Validators: []validator.String{
56-
stringvalidator.ConflictsWith(
57-
path.Expressions{
58-
path.MatchRoot("url"),
59-
}...,
60-
),
61-
},
6255
},
6356
"connect_token": schema.StringAttribute{
6457
MarkdownDescription: "A valid token for your 1Password Connect server. Can also be sourced from `OP_CONNECT_TOKEN` environment variable. Provider will use 1Password Connect server if set.",
6558
Optional: true,
6659
Sensitive: true,
67-
Validators: []validator.String{
68-
stringvalidator.ConflictsWith(
69-
path.Expressions{
70-
path.MatchRoot("token"),
71-
}...,
72-
),
73-
},
7460
},
7561
"url": schema.StringAttribute{
7662
MarkdownDescription: "The HTTP(S) URL where your 1Password Connect server can be found. Can also be sourced `OP_CONNECT_HOST` environment variable. Provider will use 1Password Connect server if set. Deprecated: Use `connect_url` instead.",
@@ -82,6 +68,7 @@ func (p *OnePasswordProvider) Schema(ctx context.Context, req provider.SchemaReq
8268
}...,
8369
),
8470
},
71+
DeprecationMessage: "The \"url\" field is deprecated and will be removed in a future version. Use \"connect_url\" instead.",
8572
},
8673
"token": schema.StringAttribute{
8774
MarkdownDescription: "A valid token for your 1Password Connect server. Can also be sourced from `OP_CONNECT_TOKEN` environment variable. Provider will use 1Password Connect server if set. Deprecated: Use `connect_token` instead.",
@@ -94,6 +81,7 @@ func (p *OnePasswordProvider) Schema(ctx context.Context, req provider.SchemaReq
9481
}...,
9582
),
9683
},
84+
DeprecationMessage: "The \"token\" field is deprecated and will be removed in a future version. Use \"connect_token\" instead.",
9785
},
9886
"service_account_token": schema.StringAttribute{
9987
MarkdownDescription: "A valid 1Password service account token. Can also be sourced from `OP_SERVICE_ACCOUNT_TOKEN` environment variable.",
@@ -134,11 +122,9 @@ func (p *OnePasswordProvider) Configure(ctx context.Context, req provider.Config
134122

135123
// Old field names - these are deprecated and will be removed in a future version.
136124
if !config.ConnectHostOld.IsNull() {
137-
resp.Diagnostics.AddWarning("Deprecated field", "The \"url\" field is deprecated and will be removed in a future version. Use \"connect_url\" instead.")
138125
connectHost = config.ConnectHostOld.ValueString()
139126
}
140127
if !config.ConnectTokenOld.IsNull() {
141-
resp.Diagnostics.AddWarning("Deprecated field", "The \"token\" field is deprecated and will be removed in a future version. Use \"connect_token\" instead.")
142128
connectToken = config.ConnectTokenOld.ValueString()
143129
}
144130

test/e2e/item_resource_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,8 +554,8 @@ func TestAccItemResourceTags(t *testing.T) {
554554
tags []string
555555
}{
556556
{"CREATE_ITEM_WITH_2_TAGS", []string{"firstTestTag", "secondTestTag"}},
557-
// {"ADD_3RD_TAG", []string{"firstTestTag", "secondTestTag", "thirdTestTag"}},
558-
// {"REMOVE_2_TAGS", []string{"firstTestTag"}},
557+
{"ADD_3RD_TAG", []string{"firstTestTag", "secondTestTag", "thirdTestTag"}},
558+
{"REMOVE_2_TAGS", []string{"firstTestTag"}},
559559
}
560560

561561
testVaultID := vault.GetTestVaultID(t)

0 commit comments

Comments
 (0)