File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
pkg/integration/components Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -10,23 +10,25 @@ type FileSystem struct {
1010}
1111
1212// This does _not_ check the files panel, it actually checks the filesystem
13- func (self * FileSystem ) PathPresent (path string ) {
13+ func (self * FileSystem ) PathPresent (path string ) * FileSystem {
1414 self .assertWithRetries (func () (bool , string ) {
1515 _ , err := os .Stat (path )
1616 return err == nil , fmt .Sprintf ("Expected path '%s' to exist, but it does not" , path )
1717 })
18+ return self
1819}
1920
2021// This does _not_ check the files panel, it actually checks the filesystem
21- func (self * FileSystem ) PathNotPresent (path string ) {
22+ func (self * FileSystem ) PathNotPresent (path string ) * FileSystem {
2223 self .assertWithRetries (func () (bool , string ) {
2324 _ , err := os .Stat (path )
2425 return os .IsNotExist (err ), fmt .Sprintf ("Expected path '%s' to not exist, but it does" , path )
2526 })
27+ return self
2628}
2729
2830// Asserts that the file at the given path has the given content
29- func (self * FileSystem ) FileContent (path string , matcher * TextMatcher ) {
31+ func (self * FileSystem ) FileContent (path string , matcher * TextMatcher ) * FileSystem {
3032 self .assertWithRetries (func () (bool , string ) {
3133 _ , err := os .Stat (path )
3234 if os .IsNotExist (err ) {
@@ -46,4 +48,5 @@ func (self *FileSystem) FileContent(path string, matcher *TextMatcher) {
4648
4749 return true , ""
4850 })
51+ return self
4952}
You can’t perform that action at this time.
0 commit comments