File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -32,3 +32,23 @@ func TestCreateTopLevelDirectoriesErrorsWithSamePathForRootAndState(t *testing.T
3232 })
3333 assert .Check (t , is .Error (err , "root and state must be different paths" ))
3434}
35+
36+ func TestCreateTopLevelDirectoriesWithEmptyStatePath (t * testing.T ) {
37+ statePath := ""
38+ rootPath := "/tmp/path/for/testing"
39+ err := CreateTopLevelDirectories (& srvconfig.Config {
40+ Root : rootPath ,
41+ State : statePath ,
42+ })
43+ assert .Check (t , is .Error (err , "state must be specified" ))
44+ }
45+
46+ func TestCreateTopLevelDirectoriesWithEmptyRootPath (t * testing.T ) {
47+ statePath := "/tmp/path/for/testing"
48+ rootPath := ""
49+ err := CreateTopLevelDirectories (& srvconfig.Config {
50+ Root : rootPath ,
51+ State : statePath ,
52+ })
53+ assert .Check (t , is .Error (err , "root must be specified" ))
54+ }
You can’t perform that action at this time.
0 commit comments