-
-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have to recreate test accounts + full layout for integration tests a …
…second time (6590883) because Mega has decided to close the test accounts one more time.
- Loading branch information
Showing
7 changed files
with
82 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,4 +234,5 @@ tools/* | |
!tools/packages.config | ||
|
||
# Ignore Rider | ||
.idea/* | ||
.idea/* | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,8 +199,8 @@ public void GenerateAuthInfos_InvalidCredentials_Throws(string email, string pas | |
} | ||
|
||
[Theory] | ||
[InlineData("[email protected]", "password", null, "{'Email':'[email protected]','Hash':'ObELy57HULI','PasswordAesKey':'ZAM5cl5uvROiXwBSEp98sQ==','MFAKey':null}")] | ||
[InlineData("[email protected]", "password", "mfa", "{'Email':'[email protected]','Hash':'ObELy57HULI','PasswordAesKey':'ZAM5cl5uvROiXwBSEp98sQ==','MFAKey':'mfa'}")] | ||
[InlineData("[email protected]", "password", null, "{'Email':'[email protected]','Hash':'gafGcRqHrzI9lwIJyLoNLA','PasswordAesKey':'o7HMO8ZSIiMEMBIDgzpj6Q==','MFAKey':null}")] | ||
[InlineData("[email protected]", "password", "mfa", "{'Email':'[email protected]','Hash':'gafGcRqHrzI9lwIJyLoNLA','PasswordAesKey':'o7HMO8ZSIiMEMBIDgzpj6Q==','MFAKey':'mfa'}")] | ||
public void GenerateAuthInfos_ValidCredentials_Succeeds(string email, string password, string mfa, string expectedResult) | ||
{ | ||
var authInfos = Context.Client.GenerateAuthInfos(email, password, mfa); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,15 +2,22 @@ | |
|
||
Integration tests require a specific layout. It can be generated by following the following steps and updating the `inputs.json` file. | ||
|
||
### Accounts creation | ||
Two account are required to generate this layout. You should create the accounts on https://mega.nz website | ||
``` | ||
Account1 = [email protected] | ||
Account2 = [email protected] | ||
``` | ||
|
||
### Install megacmd and launch the server | ||
``` | ||
scoop install megacmd | ||
$env:USERPROFILE\scoop\apps\megacmd\current\MEGAcmdServer.exe | ||
."$env:USERPROFILE\scoop\apps\megacmd\current\MEGAcmdServer.exe" | ||
``` | ||
|
||
### Launch megacmd | ||
``` | ||
$env:USERPROFILE\scoop\apps\megacmd\current\MEGAcmdShell.exe | ||
."$env:USERPROFILE\scoop\apps\megacmd\current\MEGAcmdShell.exe" | ||
``` | ||
|
||
### Layout | ||
|
@@ -30,25 +37,10 @@ $env:USERPROFILE\scoop\apps\megacmd\current\MEGAcmdShell.exe | |
+-SharedRemoteSubSubFolder | ||
``` | ||
|
||
### Accounts creation | ||
Two account are required to generate this layout | ||
``` | ||
$account="[email protected]" | ||
$accountshare="[email protected]" | ||
``` | ||
|
||
``` | ||
signup $account $account --name="megaapiclient" | ||
confirm [LINK] $account $account | ||
``` | ||
``` | ||
signup $accountshare $accountshare --name="megaapiclient share" | ||
confirm [LINK] $accountshare $accountshare | ||
``` | ||
|
||
### Layout configuration | ||
``` | ||
login $accountshare $accountshare | ||
login [ACCOUNT2] [PASSWORD2] | ||
mkdir SharedRemoteFolder | ||
cd SharedRemoteFolder | ||
|
@@ -58,15 +50,16 @@ cd SharedRemoteSubFolder | |
put Data\SampleFile.jpg SharedRemoteSubFile.jpg | ||
mkdir SharedRemoteSubSubFolder | ||
cd | ||
share -a --with=$account SharedRemoteFolder | ||
share -a --with=[ACCOUNT1] SharedRemoteFolder | ||
logout | ||
``` | ||
|
||
``` | ||
login $account $account | ||
login [ACCOUNT1] [PASSWORD1] | ||
rm "Welcome to MEGA.pdf" | ||
put SampleZipFile.zip SampleZipFile.zip | ||
mkdir SharedFolder | ||
cd SharedFolder | ||
put Data\SampleFile.jpg SharedFile.jpg | ||
|
@@ -78,19 +71,20 @@ put Data\SampleFileUpSideDown.jpg SharedFileUpSideDown.jpg | |
cd | ||
export -a -f SharedFolder | ||
export -a -f SharedFolder/SharedFile.jpge | ||
export -a -f SharedFolder/SharedFile.jpg | ||
export -a -f SampleZipFile.zip | ||
showpcr | ||
ipc $accountshare -a | ||
ipc [ACCOUNT2] -a | ||
# Commands used to retrieve the required informations | ||
ls --tree --show-handles -aaa | ||
ls --tree --show-handles -aaa $accountshare:SharedRemoteFolder | ||
ls --tree --show-handles -aaa [ACCOUNT2]:SharedRemoteFolder | ||
# Command used to retrieve the masterkey | ||
masterkey | ||
logout | ||
``` | ||
|
||
Once the layout is created, the file `inputs.json` can be updated accordingly | ||
Once the layout is created, the file `inputs.json` should be updated accordingly |