add close for files

This commit is contained in:
Shreyas Goenka 2023-05-17 14:49:03 +02:00
parent fb2da25f28
commit 5771b62afd
No known key found for this signature in database
GPG Key ID: 92A07DF49CCB0622
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ func TestTemplateInitializationForDevConfig(t *testing.T) {
tmp := t.TempDir()
f, err := os.Create(filepath.Join(tmp, "config.json"))
require.NoError(t, err)
defer f.Close()
_, err = f.WriteString(`
{
"project_name": "development_project",
@ -52,6 +53,7 @@ func TestTemplateInitializationForProdConfig(t *testing.T) {
tmp := t.TempDir()
f, err := os.Create(filepath.Join(tmp, "config.json"))
require.NoError(t, err)
defer f.Close()
_, err = f.WriteString(`
{
"project_name": "production_project",