Enable staticcheck, fix issues (#542)
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package main_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"testing"
|
||||
@@ -16,7 +15,7 @@ func TestReadConfigFile(t *testing.T) {
|
||||
// Ensure global AWS settings are propagated down to replica configurations.
|
||||
t.Run("PropagateGlobalSettings", func(t *testing.T) {
|
||||
filename := filepath.Join(t.TempDir(), "litestream.yml")
|
||||
if err := ioutil.WriteFile(filename, []byte(`
|
||||
if err := os.WriteFile(filename, []byte(`
|
||||
access-key-id: XXX
|
||||
secret-access-key: YYY
|
||||
|
||||
@@ -48,7 +47,7 @@ dbs:
|
||||
os.Setenv("LITESTREAM_TEST_1872363", "s3://foo/bar")
|
||||
|
||||
filename := filepath.Join(t.TempDir(), "litestream.yml")
|
||||
if err := ioutil.WriteFile(filename, []byte(`
|
||||
if err := os.WriteFile(filename, []byte(`
|
||||
dbs:
|
||||
- path: $LITESTREAM_TEST_0129380
|
||||
replicas:
|
||||
@@ -75,7 +74,7 @@ dbs:
|
||||
os.Setenv("LITESTREAM_TEST_9847533", "s3://foo/bar")
|
||||
|
||||
filename := filepath.Join(t.TempDir(), "litestream.yml")
|
||||
if err := ioutil.WriteFile(filename, []byte(`
|
||||
if err := os.WriteFile(filename, []byte(`
|
||||
dbs:
|
||||
- path: /path/to/db
|
||||
replicas:
|
||||
|
||||
Reference in New Issue
Block a user