@@ -16,7 +16,7 @@ import (
1616 "github.com/databricks/cli/libs/testdiff"
1717 "github.com/databricks/databricks-sdk-go"
1818 "github.com/databricks/databricks-sdk-go/service/iam"
19- "github.com/stretchr/testify/require "
19+ "github.com/stretchr/testify/assert "
2020)
2121
2222var OverwriteMode = os .Getenv ("TESTS_OUTPUT" ) == "OVERWRITE"
@@ -26,7 +26,7 @@ func ReadFile(t testutil.TestingT, ctx context.Context, filename string) string
2626 if os .IsNotExist (err ) {
2727 return ""
2828 }
29- require .NoError (t , err )
29+ assert .NoError (t , err )
3030 // On CI, on Windows \n in the file somehow end up as \r\n
3131 return NormalizeNewlines (string (data ))
3232}
@@ -35,18 +35,18 @@ func captureOutput(t testutil.TestingT, ctx context.Context, args []string) stri
3535 t .Logf ("run args: [%s]" , strings .Join (args , ", " ))
3636 r := NewRunner (t , ctx , args ... )
3737 stdout , stderr , err := r .Run ()
38- require .NoError (t , err )
38+ assert .NoError (t , err )
3939 out := stderr .String () + stdout .String ()
4040 return ReplaceOutput (t , ctx , out )
4141}
4242
4343func WriteFile (t testutil.TestingT , filename , data string ) {
4444 t .Logf ("Overwriting %s" , filename )
4545 err := os .WriteFile (filename , []byte (data ), 0o644 )
46- require .NoError (t , err )
46+ assert .NoError (t , err )
4747}
4848
49- func RequireOutput (t testutil.TestingT , ctx context.Context , args []string , expectedFilename string ) {
49+ func AssertOutput (t testutil.TestingT , ctx context.Context , args []string , expectedFilename string ) {
5050 _ , filename , _ , _ := runtime .Caller (1 )
5151 dir := filepath .Dir (filename )
5252 expectedPath := filepath .Join (dir , expectedFilename )
@@ -64,7 +64,7 @@ func RequireOutput(t testutil.TestingT, ctx context.Context, args []string, expe
6464 }
6565}
6666
67- func RequireOutputJQ (t testutil.TestingT , ctx context.Context , args []string , expectedFilename string , ignorePaths []string ) {
67+ func AssertOutputJQ (t testutil.TestingT , ctx context.Context , args []string , expectedFilename string , ignorePaths []string ) {
6868 _ , filename , _ , _ := runtime .Caller (1 )
6969 dir := filepath .Dir (filename )
7070 expectedPath := filepath .Join (dir , expectedFilename )
0 commit comments