Skip to content

Commit

Permalink
fix: add missing git-crypt setup, improve test descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
omissis committed Sep 10, 2022
1 parent b1bcc72 commit 8d59833
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/development.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update Apt Deps
run: apt-get update -y
- name: Setup Git Crypt
run: apt-get install -y git-crypt
- name: Setup Golang
uses: actions/setup-go@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions internal/arch/file/expect/be_gitencrypted_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,27 @@ func Test_BeGitencrypted(t *testing.T) {
want []rule.CoreViolation
}{
{
desc: "file 'encrypted.txt' expect be gitencrypted",
desc: "file 'encrypted.txt' is expected to be gitencrypted",
ruleBuilder: file.One(filepath.Join(basePath, "test/encrypted.txt")),
want: nil,
},
{
desc: "file 'not_encrypted.txt' expect be gitencrypted",
desc: "file 'not_encrypted.txt' is expected to be gitencrypted",
ruleBuilder: file.One(filepath.Join(basePath, "test/not_encrypted.txt")),
want: []rule.CoreViolation{
rule.NewCoreViolation("file 'not_encrypted.txt' is not gitencrypted"),
},
},
{
desc: "negated: file 'encrypted.txt' expect not be gitencrypted",
desc: "negated: file 'encrypted.txt' is not expected to be gitencrypted",
ruleBuilder: file.One(filepath.Join(basePath, "test/encrypted.txt")),
options: []expect.Option{expect.Negated{}},
want: []rule.CoreViolation{
rule.NewCoreViolation("file 'encrypted.txt' is gitencrypted"),
},
},
{
desc: "negated: file 'not_encrypted.txt' expect not be gitencrypted",
desc: "negated: file 'not_encrypted.txt' is not expected to be gitencrypted",
ruleBuilder: file.One(filepath.Join(basePath, "test/not_encrypted.txt")),
options: []expect.Option{expect.Negated{}},
want: nil,
Expand Down

0 comments on commit 8d59833

Please # to comment.