-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7bc884
commit 97c6cd9
Showing
8 changed files
with
113 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
pkg/acceptance/bettertestspoc/assert/objectassert/resource_monitor_snowflake_ext.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package objectassert | ||
|
||
import ( | ||
"fmt" | ||
"testing" | ||
|
||
"github.com/Snowflake-Labs/terraform-provider-snowflake/pkg/sdk" | ||
) | ||
|
||
func (r *ResourceMonitorAssert) HasNonEmptyStartTime() *ResourceMonitorAssert { | ||
r.AddAssertion(func(t *testing.T, o *sdk.ResourceMonitor) error { | ||
t.Helper() | ||
if o.StartTime == "" { | ||
return fmt.Errorf("expected start time to be non empty") | ||
} | ||
return nil | ||
}) | ||
return r | ||
} | ||
|
||
func (r *ResourceMonitorAssert) HasNonEmptyEndTime() *ResourceMonitorAssert { | ||
r.AddAssertion(func(t *testing.T, o *sdk.ResourceMonitor) error { | ||
t.Helper() | ||
if o.StartTime == "" { | ||
return fmt.Errorf("expected end time to be non empty") | ||
} | ||
return nil | ||
}) | ||
return r | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters