github.com/StackExchange/blackbox/v2@v2.0.1-0.20220331193400-d84e904973ab/integrationTest/NOTES.txt (about)

     1  
     2  This should accept VCS-type and --crypto flags.
     3  Then a shell script should run various combinations of VCS and crypters.
     4  
     5  # Startup
     6  * Create a repo (git, none)
     7  
     8  # Test basic operations:
     9  * As Alice:
    10    * initialize blackbox, add her keys to it, see that the usual files
    11      exist. See her name in bb-admins.txt
    12    * encrypt a file, see that the plaintext is deleted, see the file in bb-files.txt
    13    * decrypt the file, see the original plaintext is recovered.
    14    * Encrypt a file --noshred.
    15    * Decrypt the file, it should fail as the plaintext exists.
    16    * Remove the plaintext.
    17    * Decrypt the file, it should fail as the plaintext exists.
    18  
    19  # Test hand-off from Alice to Bob.
    20  * As Bob
    21      * add himself to the admins.
    22  * As Alice
    23      * Update-all-files
    24      * Create a new file. Encrypt it.
    25  * As Bob
    26      * Decrypt both files
    27      * Verify contents of the new file, and the file from previous.
    28      * Create a new file. Encrypt it.
    29  * As Alice:
    30      * Decrypt all files.
    31      * Verify contents of the 3 plaintext files.
    32  
    33  # Test a git-less directory
    34  * Copy the old repo somewhere. Remove the .git directory.
    35  * As Alice:
    36      * Decrypt all
    37      * Verify plaintext contents
    38  
    39  # Test post-deploy with/without GID
    40  * Back at the original repo:
    41  * Shred all
    42  * Run post-deploy. Verify.
    43  * Shred all
    44  * Run post-deploy with a custom GID. Verify.
    45  
    46  # Test removing an admin
    47  * As Bob:
    48      * removes Alice. (Verify)
    49      * Re-encrypt
    50      * Decrypt all & verify.
    51  * As alice
    52      * Decrypting should fail.
    53  
    54  # Test funny names and paths
    55      * my/path/to/relsecrets.txt
    56      * cwd=other/place ../../my/path/to/relsecrets.txt
    57      * !important!.txt
    58      * #andpounds.txt
    59      * stars*bars?.txt
    60      * space space.txt
    61  * Do add/encrypt/decrypt
    62  * Do blackbox_update_all_files
    63  * Do remove them all
    64  
    65  # When people start asking for commands to work with relative paths
    66  # Test from outside the repo
    67  * mkdir ../other/place
    68  * cd    ../other/place
    69  * decrypt ../../secret1.txt
    70  * encrypt ../../secret1.txt
    71  
    72  # Test specific commands:
    73  # blackbox admins list
    74  # blackbox file list
    75  # blackbox status --name-only (create 1 of each "type")
    76  # blackbox status --type=FOO
    77  
    78  # These should all fail:
    79  # blackbox file list --all
    80  # blackbox file list blah
    81  # blackbox shred list --all
    82  # blackbox shred list blah
    83  
    84  
    85  
    86  rm -rf /tmp/bbhome-* && BLACKBOX_DEBUG=true go test -verbose -long -nocleanup
    87  rm -rf /tmp/bbhome-* && go test -long -nocleanup
    88  
    89  ( gbb && cd cmd/blackbox && go install ) && blackbox
    90  
    91  cd /tmp && rm -rf /tmp/bbhome-* ; mkdir /tmp/bbhome-1 ; cd /tmp/bbhome-1 && git init ; gitmeWork ; ( gbb && cd cmd/blackbox && go install ) && blackbox init yes && gitmeWork ; git commit -mm -a ; blackbox admin add tlimoncelli ; git commit -mnewadmin -a ; echo secrt > secret.txt ; blackbox file add secret.txt