refactor(host): clean up comments and fix typos in dry-run validation blocks
This commit is contained in:
1 parent
53ae987c3c
commit
389dd87972
2 files changed
+8
-8
No files matched your search
@@ -191,7 +191,7 @@ func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalo
|
||||
return nil, errors.BadRequestStatusf("error loading persisted state: %s", err)
|
||||
}
|
||||
|
||||
// New: perform dry run to ensure we can interact with AWS as expected.
|
||||
// New: perform dry run to ensure we can interact with AWS as expected.
|
||||
opts := []ec2Option{}
|
||||
if newCatalogAttributes.DualStack {
|
||||
opts = append(opts, WithDualStack(newCatalogAttributes.DualStack))
|
||||
@@ -241,7 +241,7 @@ func (p *HostPlugin) OnUpdateCatalog(ctx context.Context, req *pb.OnUpdateCatalo
|
||||
return nil, errors.BadRequestStatusf("error loading persisted state: %s", err)
|
||||
}
|
||||
|
||||
// perform dry run to ensure we can interact with AWS as expected.
|
||||
// New: perform dry run to ensure we can interact with AWS as expected.
|
||||
opts := []ec2Option{}
|
||||
if newCatalogAttributes.DualStack {
|
||||
opts = append(opts, WithDualStack(newCatalogAttributes.DualStack))
|
||||
@@ -395,7 +395,7 @@ func (p *HostPlugin) OnCreateSet(ctx context.Context, req *pb.OnCreateSetRequest
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// perform dry run to ensure we can interact with AWS as expected.
|
||||
// New: perform dry run to ensure we can interact with AWS as expected.
|
||||
opts := []ec2Option{}
|
||||
if catalogAttributes.DualStack {
|
||||
opts = append(opts, WithDualStack(catalogAttributes.DualStack))
|
||||
@@ -461,7 +461,7 @@ func (p *HostPlugin) OnUpdateSet(ctx context.Context, req *pb.OnUpdateSetRequest
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// perform dry run to ensure we can interact with AWS as expected.
|
||||
// New: perform dry run to ensure we can interact with AWS as expected.
|
||||
opts := []ec2Option{}
|
||||
if catalogAttributes.DualStack {
|
||||
opts = append(opts, WithDualStack(catalogAttributes.DualStack))
|
||||
|
||||
@@ -742,7 +742,7 @@ func TestPluginOnCreateCatalogErr(t *testing.T) {
|
||||
testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)),
|
||||
)),
|
||||
},
|
||||
// checkHosts returns the DescribeInstances error as-is rather than
|
||||
// New: checkHosts returns the DescribeInstances error as-is rather than
|
||||
// wrapping it in a gRPC FailedPrecondition status like the old
|
||||
// dryRunValidation did. A plain Go error maps to codes.Unknown.
|
||||
expectedErrContains: testDescribeInstancesError,
|
||||
@@ -997,7 +997,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) {
|
||||
testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)),
|
||||
)),
|
||||
},
|
||||
// checkHosts returns the DesribeInstances errror as-is rather than wrapping it
|
||||
// New: checkHosts returns the DesribeInstances errror as-is rather than wrapping it
|
||||
// in a gRpc FailedPrecodndition status like the old dryRunValidiation did.
|
||||
// A plain Go error maps to codeds.Unknown.
|
||||
expectedErrContains: testDescribeInstancesError,
|
||||
@@ -1042,7 +1042,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) {
|
||||
testMockEC2WithDescribeInstancesError(errors.New(testDescribeInstancesError)),
|
||||
)),
|
||||
},
|
||||
// checkHosts returns the DescribeInstances error as-is rather than wrapping it
|
||||
// New: checkHosts returns the DescribeInstances error as-is rather than wrapping it
|
||||
// in a gRPC FailedPrecondition status like the old dryRunValidiation did.
|
||||
// A plain Go error maps to codes.Unknown.
|
||||
expectedErrContains: testDescribeInstancesError,
|
||||
@@ -1220,7 +1220,7 @@ func TestPluginOnUpdateCatalogErr(t *testing.T) {
|
||||
testMockEC2WithDescribeInstancesError(fmt.Errorf("oops there was an error")),
|
||||
)),
|
||||
},
|
||||
// checkHosts returns the DescribeInstances error as-is rather than wrapping it
|
||||
// New: checkHosts returns the DescribeInstances error as-is rather than wrapping it
|
||||
// in a gRPC FailedPrecondition status like the old dryRunValidiation did.
|
||||
// A plain Go error maps to codes.Unknown.
|
||||
expectedErrContains: "oops there was an error",
|
||||
|
||||
Reference in new issue
Block a user