Skip to content

Commit

Permalink
Merge branch 'full-code-coverage-report-for-master' into 'master'
Browse files Browse the repository at this point in the history
Full code coverage report for master

See merge request eriknellessen/encrypting-cloud-storages!7
  • Loading branch information
eriknellessen committed Jan 18, 2022
2 parents f927e88 + f67422d commit c0b9ee9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build:
stage: build
script:
- cd build
- cmake ..
- GPG_KEY_FINGERPRINT=0102030405060708090A0B0C0D0E0F1011121314 cmake ..
- make install

artifacts:
Expand All @@ -51,7 +51,7 @@ test:
reports:
cobertura: build/coverage.xml
paths:
- build/coverage.html
- build/coverage*.html
cache:
key: build-cache
paths:
Expand Down
10 changes: 6 additions & 4 deletions fuseecs/configuration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,10 @@ sed -i '/#define ACCESS_USER_ID /c\#define ACCESS_USER_ID '`echo $UID` configura
sed -i '/#define MOUNTPOINT_DIRECTORY \"\"/c\#define MOUNTPOINT_DIRECTORY \"'$MOUNTPOINT'\"' configuration.h
sed -i '/#define ROOT_DIRECTORY \"\"/c\#define ROOT_DIRECTORY \"'$ENCRYPTED_DIRECTORY'\"' configuration.h
sed -i '/#define DECRYPTED_DIRECTORY \"\"/c\#define DECRYPTED_DIRECTORY \"'$DECRYPTED_DIRECTORY'\"' configuration.h
printf "Listing keys:\n"
gpg2 --list-secret-keys
read -p "Please copy and paste your key's fingerprint: " GPG_KEY_FINGERPRINT
if [[ -z "${GPG_KEY_FINGERPRINT}" ]]; then
printf "Listing keys:\n"
gpg2 --list-secret-keys
read -p "Please copy and paste your key's fingerprint: " GPG_KEY_FINGERPRINT
fi
sed -i '/#define OWN_PUBLIC_KEY_FINGERPRINT \"\"/c\#define OWN_PUBLIC_KEY_FINGERPRINT \"'$GPG_KEY_FINGERPRINT'\"' configuration.h
printf "Configuring configuration.h done.\n"
printf "Configuring configuration.h done.\n"
2 changes: 2 additions & 0 deletions fuseecs/test/gpg_operations_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@ int __wrap_access(const char *pathname, int how) {
return __real_access(pathname, how);
}

check_expected(pathname);
return mock_type(int);
}

static void test_directory_contains_authentic_file(void **state) {
expect_string(__wrap_access, pathname, "/foo/bar.txt0102030405060708090A0B0C0D0E0F1011121314.gpg");
will_return(__wrap_access, 1);

char *encrypted_directory = "/foo/";
Expand Down

0 comments on commit c0b9ee9

Please sign in to comment.