Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
EronWright committed Jan 24, 2024
1 parent b950731 commit 745a6f3
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 39 deletions.
36 changes: 0 additions & 36 deletions provider/pkg/provider/provider_checkconfig_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,42 +32,6 @@ import (
pulumirpc "github.com/pulumi/pulumi/sdk/v3/proto/go"
)

// type CheckFailureMatcher struct {
// Property string
// Reason string
// }

// var _ gomegatypes.GomegaMatcher = &CheckFailureMatcher{}

// func (matcher *CheckFailureMatcher) Match(actual interface{}) (success bool, err error) {
// if failure, ok := actual.(*pulumirpc.CheckFailure); ok {
// if failure.GetProperty() != matcher.Property {
// return false, nil
// }
// if failure.GetReason() != matcher.Reason {
// return false, nil
// }
// return true, nil
// }
// return false, fmt.Errorf("CheckFailureMatcher matcher expects a *pulumirpc.CheckFailure")
// }

// func (matcher *CheckFailureMatcher) FailureMessage(actual interface{}) (message string) {
// var msg strings.Builder
// fmt.Fprintf(&msg, "Expected:\n\t%#v\nto have ", actual)
// fmt.Fprintf(&msg, "property=%q", matcher.Property)
// fmt.Fprintf(&msg, "reason=%q", matcher.Reason)
// return msg.String()
// }

// func (matcher *CheckFailureMatcher) NegatedFailureMessage(actual interface{}) (message string) {
// var msg strings.Builder
// fmt.Fprintf(&msg, "Expected:\n\t%#v\nto not have ", actual)
// fmt.Fprintf(&msg, "property=%q", matcher.Property)
// fmt.Fprintf(&msg, "reason=%q", matcher.Reason)
// return msg.String()
// }

func MatchCheckFailure(prop string) gomegatypes.GomegaMatcher {
return WithTransform(func(failure *pulumirpc.CheckFailure) string {
return failure.GetProperty()
Expand Down
3 changes: 0 additions & 3 deletions provider/pkg/provider/provider_configure_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,6 @@ var _ = BeforeSuite(func() {
t: GinkgoT(),
logger: log.New(&buff, "\t", 0),
}
// t.Cleanup(func() {
// log.Default().Printf("Engine Log:\n%s", buff.String())
// })
ctx, cancel := context.WithCancel(context.Background())
host := newMockHost(ctx, engine)
DeferCleanup(func() {
Expand Down

0 comments on commit 745a6f3

Please sign in to comment.