From 8d59833285af9ab2c479ef9444094e8caee30c21 Mon Sep 17 00:00:00 2001 From: omissis Date: Sat, 10 Sep 2022 20:37:25 +0200 Subject: [PATCH] fix: add missing git-crypt setup, improve test descriptions --- .github/workflows/development.yaml | 4 ++++ internal/arch/file/expect/be_gitencrypted_test.go | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/development.yaml b/.github/workflows/development.yaml index 40159b1..404984b 100644 --- a/.github/workflows/development.yaml +++ b/.github/workflows/development.yaml @@ -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: diff --git a/internal/arch/file/expect/be_gitencrypted_test.go b/internal/arch/file/expect/be_gitencrypted_test.go index 33c0f1e..8240f74 100644 --- a/internal/arch/file/expect/be_gitencrypted_test.go +++ b/internal/arch/file/expect/be_gitencrypted_test.go @@ -28,19 +28,19 @@ 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{ @@ -48,7 +48,7 @@ func Test_BeGitencrypted(t *testing.T) { }, }, { - 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,