mirror of
https://github.com/balena-io/balena-cli.git
synced 2025-01-30 08:03:55 +00:00
Move FsUtils inside resin/data
This commit is contained in:
parent
5b470f1a0a
commit
cf4778f889
@ -1,5 +1,5 @@
|
||||
mkdirp = require('mkdirp')
|
||||
fsUtils = require('../../fs-utils/fs-utils')
|
||||
fsUtils = require('./fs-utils/fs-utils')
|
||||
|
||||
prefix = null
|
||||
|
||||
|
@ -2,7 +2,7 @@ expect = require('chai').expect
|
||||
_ = require('lodash')
|
||||
async = require('async')
|
||||
fs = require('fs')
|
||||
fsUtils = require('../../fs-utils/fs-utils')
|
||||
fsUtils = require('./fs-utils/fs-utils')
|
||||
rimraf = require('rimraf')
|
||||
dataPrefix = require('./data-prefix')
|
||||
config = require('../config')
|
||||
|
@ -1,7 +1,7 @@
|
||||
fs = require('fs')
|
||||
path = require('path')
|
||||
rimraf = require('rimraf')
|
||||
fsUtils = require('../../fs-utils/fs-utils')
|
||||
fsUtils = require('./fs-utils/fs-utils')
|
||||
exports.prefix = require('./data-prefix')
|
||||
|
||||
haltIfNoPrefix = (callback) ->
|
||||
|
@ -1,6 +1,6 @@
|
||||
expect = require('chai').expect
|
||||
_ = require('lodash')
|
||||
fsUtils = require('../../fs-utils/fs-utils')
|
||||
fsUtils = require('./fs-utils/fs-utils')
|
||||
mock = require('../../../tests/utils/mock')
|
||||
async = require('async')
|
||||
config = require('../config')
|
||||
|
@ -1,7 +1,8 @@
|
||||
expect = require('chai').expect
|
||||
mock = require('../../tests/utils/mock')
|
||||
mock = require('../../../../tests/utils/mock')
|
||||
fsUtils = require('./fs-utils')
|
||||
resin = require('../resin')
|
||||
config = require('../../config')
|
||||
data = require('../../data/data')
|
||||
|
||||
FILESYSTEM =
|
||||
text:
|
||||
@ -29,7 +30,7 @@ describe 'FsUtils:', ->
|
||||
it 'should return true for valid paths', ->
|
||||
|
||||
for validPath in [
|
||||
resin.config.dataPrefix
|
||||
config.dataPrefix
|
||||
'/Users/johndoe'
|
||||
'../parent'
|
||||
'./file/../file2'
|
||||
@ -40,7 +41,7 @@ describe 'FsUtils:', ->
|
||||
|
||||
beforeEach (done) ->
|
||||
mock.fs.init(FILESYSTEM)
|
||||
resin.data.prefix.set(resin.config.dataPrefix, done)
|
||||
data.prefix.set(config.dataPrefix, done)
|
||||
|
||||
afterEach ->
|
||||
mock.fs.restore()
|
Loading…
x
Reference in New Issue
Block a user