$applicable = 'all';
$isPersonal = false;
- $this->assertEquals(true, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', array(), $mountType, $applicable, $isPersonal));
+ $storageOptions = array(
+ 'host' => 'localhost',
+ 'user' => 'testuser',
+ 'password' => '12345',
+ );
+
+ $this->assertEquals(true, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', $storageOptions, $mountType, $applicable, $isPersonal));
$config = $this->readGlobalConfig();
$this->assertEquals(1, count($config));
$applicable = self::TEST_USER1;
$isPersonal = true;
- $this->assertEquals(true, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', array(), $mountType, $applicable, $isPersonal));
+ $storageOptions = array(
+ 'host' => 'localhost',
+ 'user' => 'testuser',
+ 'password' => '12345',
+ );
+
+ $this->assertEquals(true, OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', $storageOptions, $mountType, $applicable, $isPersonal));
$config = $this->readUserConfig();
$this->assertEquals(1, count($config));
implode(',', array_keys($this->allBackends))
);
+ $storageOptions = array(
+ 'host' => 'localhost',
+ 'user' => 'testuser',
+ 'password' => '12345',
+ );
+
// non-local but forbidden
- $this->assertFalse(OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', array(), $mountType, $applicable, $isPersonal));
+ $this->assertFalse(OC_Mount_Config::addMountPoint('/ext', '\OC\Files\Storage\SFTP', $storageOptions, $mountType, $applicable, $isPersonal));
$this->assertFalse(file_exists($this->userHome . '/mount.json'));
}
'host' => 'someost',
'user' => 'someuser',
'password' => 'somepassword',
- 'root' => 'someroot'
+ 'root' => 'someroot',
+ 'share' => '',
);
// add mount point as "test" user
'host' => 'somehost',
'user' => 'someuser',
'password' => 'somepassword',
- 'root' => 'someroot'
+ 'root' => 'someroot',
+ 'share' => '',
);
// Add mount points
'host' => 'somehost',
'user' => 'someuser',
'password' => 'somepassword',
- 'root' => 'someroot'
+ 'root' => 'someroot',
+ 'share' => '',
);
$this->assertTrue(
'host' => 'somehost',
'user' => 'someuser',
'password' => 'somepassword',
- 'root' => 'someroot'
+ 'root' => 'someroot',
+ 'share' => '',
);
// Create personal mount point