diff --git a/.gitignore b/.gitignore index 627bd5335..4fe0131b6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,8 +11,9 @@ # Output of the go coverage tool, specifically when used with LiteIDE *.out -# Dependency directories (remove the comment below to include it) -# vendor/ - # IDE -.vscode \ No newline at end of file +.vscode + +# Standard configuration file names +.corso_test.toml +.corso.toml \ No newline at end of file diff --git a/src/pkg/repository/repository_test.go b/src/pkg/repository/repository_test.go index df51d3d9b..23dc20b71 100644 --- a/src/pkg/repository/repository_test.go +++ b/src/pkg/repository/repository_test.go @@ -136,3 +136,21 @@ func (suite *RepositoryIntegrationSuite) TestInitialize() { }) } } + +func (suite *RepositoryIntegrationSuite) TestConnect() { + t := suite.T() + ctx := context.Background() + timeOfTest := ctesting.LogTimeOfTest(t) + prefix := "conn-s3-" + timeOfTest + + // need to initialize the repository before we can test connecting to it. + st, err := ctesting.NewS3Storage(prefix) + require.NoError(t, err) + + _, err = repository.Initialize(ctx, repository.Account{}, st) + require.NoError(t, err) + + // now re-connect + _, err = repository.Connect(ctx, repository.Account{}, st) + assert.NoError(t, err) +}