summaryrefslogtreecommitdiffstats
path: root/core/js/tests/specs
diff options
context:
space:
mode:
authorMichael Weimann <mail@michael-weimann.eu>2018-08-20 20:46:11 +0200
committerMichael Weimann <mail@michael-weimann.eu>2018-08-20 20:46:23 +0200
commit2bab916c535173ac723f50fecb33518db3f293d5 (patch)
tree7496981d6756638837ef4c45e0c2e5691d4c32c2 /core/js/tests/specs
parentce1e213760a0ac03e91daf6ebc08f401da27b8bc (diff)
parent6d749bf0215c4f155d402620544e669c0cce37ec (diff)
downloadnextcloud-server-2bab916c535173ac723f50fecb33518db3f293d5.tar.gz
nextcloud-server-2bab916c535173ac723f50fecb33518db3f293d5.zip
Adds license to files. Updates the branch.
Signed-off-by: Michael Weimann <mail@michael-weimann.eu>
Diffstat (limited to 'core/js/tests/specs')
-rw-r--r--core/js/tests/specs/setupchecksSpec.js82
-rw-r--r--core/js/tests/specs/shareitemmodelSpec.js2
2 files changed, 72 insertions, 12 deletions
diff --git a/core/js/tests/specs/setupchecksSpec.js b/core/js/tests/specs/setupchecksSpec.js
index 66c84f52bc9..4c0545b7b4f 100644
--- a/core/js/tests/specs/setupchecksSpec.js
+++ b/core/js/tests/specs/setupchecksSpec.js
@@ -171,7 +171,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -219,7 +220,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -268,7 +270,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -315,7 +318,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -360,7 +364,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -373,6 +378,54 @@ describe('OC.SetupChecks tests', function() {
});
});
+ it('should return a warning if there are app directories with wrong permissions', function(done) {
+ var async = OC.SetupChecks.checkSetup();
+
+ suite.server.requests[0].respond(
+ 200,
+ {
+ 'Content-Type': 'application/json',
+ },
+ JSON.stringify({
+ hasFileinfoInstalled: true,
+ isGetenvServerWorking: true,
+ isReadOnlyConfig: false,
+ hasWorkingFileLocking: true,
+ hasValidTransactionIsolationLevel: true,
+ suggestedOverwriteCliURL: '',
+ isUrandomAvailable: true,
+ securityDocs: 'https://docs.owncloud.org/myDocs.html',
+ serverHasInternetConnection: true,
+ isMemcacheConfigured: true,
+ forwardedForHeadersWorking: true,
+ isCorrectMemcachedPHPModuleInstalled: true,
+ hasPassedCodeIntegrityCheck: true,
+ isOpcacheProperlySetup: true,
+ hasOpcacheLoaded: true,
+ isSettimelimitAvailable: true,
+ hasFreeTypeSupport: true,
+ missingIndexes: [],
+ outdatedCaches: [],
+ cronErrors: [],
+ cronInfo: {
+ diffInSeconds: 0
+ },
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: [
+ '/some/path'
+ ]
+ })
+ );
+
+ async.done(function( data, s, x ){
+ expect(data).toEqual([{
+ msg: 'Some app directories are owned by a different user than the web server one. This may be the case if apps have been installed manually. Check the permissions of the following app directories:<ul><li>/some/path</li></ul>',
+ type: OC.SetupChecks.MESSAGE_TYPE_WARNING
+ }]);
+ done();
+ });
+ });
+
it('should return an error if the forwarded for headers are not working', function(done) {
var async = OC.SetupChecks.checkSetup();
@@ -405,7 +458,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -450,7 +504,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -495,6 +550,7 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
+ appDirsWithDifferentOwner: [],
isMemoryLimitSufficient: false
})
);
@@ -561,7 +617,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -607,7 +664,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -653,7 +711,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
@@ -699,7 +758,8 @@ describe('OC.SetupChecks tests', function() {
cronInfo: {
diffInSeconds: 0
},
- isMemoryLimitSufficient: true
+ isMemoryLimitSufficient: true,
+ appDirsWithDifferentOwner: []
})
);
diff --git a/core/js/tests/specs/shareitemmodelSpec.js b/core/js/tests/specs/shareitemmodelSpec.js
index 0a345786b73..2e89b2e3cda 100644
--- a/core/js/tests/specs/shareitemmodelSpec.js
+++ b/core/js/tests/specs/shareitemmodelSpec.js
@@ -345,7 +345,7 @@ describe('OC.Share.ShareItemModel', function() {
}]));
fetchSharesDeferred.resolve(makeOcsResponse([]));
- model.set('possiblePermissions', OC.PERMISSION_READ);
+ model.fileInfoModel.set('permissions', OC.PERMISSION_READ);
model.fetch();
// no resharing allowed