-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from byCrookie/feature/docker-tests
start integration tests
- Loading branch information
Showing
320 changed files
with
753 additions
and
332 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
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
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 |
---|---|---|
|
@@ -397,6 +397,7 @@ FodyWeavers.xsd | |
# JetBrains Rider | ||
*.sln.iml | ||
|
||
.idea | ||
!Backup/ | ||
!Github/Backup/ | ||
!Github/Backup/* | ||
|
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
23 changes: 23 additions & 0 deletions
23
GithubBackup.Cli.Tests.Integration/CliTests.RunAsync___args=--help.verified.txt
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
Description: | ||
Github Backup | ||
|
||
Usage: | ||
ghb [command] [options] | ||
|
||
Options: | ||
--quiet Do not print logs to console. [default: True] | ||
--log-file <log-file> Path to the log file. | ||
--verbosity <Critical|Debug|Error|Information|None|Trace|Warning> Set the verbosity level of the log file. [default: Information] | ||
--version Show version information | ||
-?, -h, --help Show help and usage information | ||
|
||
Commands: | ||
manual Manually backup a Github user. This command is interactive. | ||
migrate Migrate a Github user. | ||
login Login to Github. Persists your login token to disk for future use. | ||
Only one login token can be persisted at a time. | ||
migrations List migrations. | ||
repositories List repositories. | ||
download Download migrations. | ||
backup Backup a Github user. | ||
|
28 changes: 28 additions & 0 deletions
28
GithubBackup.Cli.Tests.Integration/CliTests.RunAsync___args=.verified.txt
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
'' was not matched. Did you mean one of the following? | ||
-h | ||
Required command was not provided. | ||
Unrecognized command or argument ''. | ||
|
||
Description: | ||
Github Backup | ||
|
||
Usage: | ||
ghb [command] [options] | ||
|
||
Options: | ||
--quiet Do not print logs to console. [default: True] | ||
--log-file <log-file> Path to the log file. | ||
--verbosity <Critical|Debug|Error|Information|None|Trace|Warning> Set the verbosity level of the log file. [default: Information] | ||
--version Show version information | ||
-?, -h, --help Show help and usage information | ||
|
||
Commands: | ||
manual Manually backup a Github user. This command is interactive. | ||
migrate Migrate a Github user. | ||
login Login to Github. Persists your login token to disk for future use. | ||
Only one login token can be persisted at a time. | ||
migrations List migrations. | ||
repositories List repositories. | ||
download Download migrations. | ||
backup Backup a Github user. | ||
|
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace GithubBackup.Cli.Tests.Integration; | ||
|
||
[UsesVerify] | ||
public class CliTests | ||
{ | ||
[Theory] | ||
[InlineData("", 1)] | ||
[InlineData("--help")] | ||
public async Task RunAsync__(string args, int exitCode = 0) | ||
{ | ||
await TestCli.RunAsync(args, exitCode, _ => {}); | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...on/Commands/Github/Login/LoginTests.RunAsync_LoginUsingToken_ThrowsException.verified.txt
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Login failed |
1 change: 1 addition & 0 deletions
1
....Cli.Tests.Integration/Commands/Github/Login/LoginTests.RunAsync_LoginUsing_.verified.txt
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Login failed |
18 changes: 18 additions & 0 deletions
18
...ts.Integration/Commands/Github/Login/LoginTests.RunAsync___args=login --help.verified.txt
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
Description: | ||
Login to Github. Persists your login token to disk for future use. | ||
Only one login token can be persisted at a time. | ||
|
||
Usage: | ||
ghb login [options] | ||
|
||
Options: | ||
--token <token> If not provided, the token will be aquired from the environment variable GITHUB_BACKUP_TOKEN. | ||
If provided, device flow authentication will be ignored. Recommended for use on servers."); | ||
--device-flow-auth Interactive authentication using the device flow. | ||
Requires a browser. Recommended for use on clients. [default: False] | ||
--quiet Do not print logs to console. [default: True] | ||
--log-file <log-file> Path to the log file. | ||
--verbosity <Critical|Debug|Error|Information|None|Trace|Warning> Set the verbosity level of the log file. [default: Information] | ||
-?, -h, --help Show help and usage information | ||
|
||
|
1 change: 1 addition & 0 deletions
1
...on/Commands/Github/Login/LoginTests.RunAsync___args=login --token test_token.verified.txt
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Token test_token is invalid |
1 change: 1 addition & 0 deletions
1
...Cli.Tests.Integration/Commands/Github/Login/LoginTests.RunAsync___args=login.verified.txt
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
Login failed |
Oops, something went wrong.