Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveromahony committed Nov 6, 2024
1 parent dbdfa1e commit 15e6b8a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/file/file_manager_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,13 @@ func TestFileManagerService_UpdateFile(t *testing.T) {
},
}

tempDir := os.TempDir()

for _, test := range tests {
ctx := context.Background()

tempDir := os.TempDir()
testFile := helpers.CreateFileWithErrorCheck(t, tempDir, "nginx.conf")
defer helpers.RemoveFileWithErrorCheck(t, testFile.Name())

var fileMeta *mpi.FileMeta
if test.isCert {
fileMeta = protos.CertMeta(testFile.Name(), "")
Expand All @@ -80,6 +81,8 @@ func TestFileManagerService_UpdateFile(t *testing.T) {

require.NoError(t, err)
assert.Equal(t, 1, fakeFileServiceClient.UpdateFileCallCount())

helpers.RemoveFileWithErrorCheck(t, testFile.Name())
}
}

Expand Down

0 comments on commit 15e6b8a

Please sign in to comment.