Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
standardised the validate logic found azure mounts
- Loading branch information
Dave Storey
committed
Jun 12, 2020
1 parent
164ea0b
commit 85ac029
Showing
5 changed files
with
35 additions
and
16 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
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,23 @@ | ||
package databricks | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestValidateMountDirectory(t *testing.T) { | ||
testCases := []struct { | ||
directory string | ||
errorCount int | ||
}{ | ||
{"", 0}, | ||
{"/directory", 0}, | ||
{"directory", 1}, | ||
} | ||
for _, tc := range testCases { | ||
_, errs := ValidateMountDirectory(tc.directory, "key") | ||
|
||
assert.Lenf(t, errs, tc.errorCount, "directory '%s' does not generate the expected error count", tc.directory) | ||
} | ||
} |
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