add repo connect s3 integration test (#192)

* add repo connect s3 integration test
This commit is contained in:
Keepers 2022-06-13 08:19:03 -06:00 committed by GitHub
parent 1957de09d2
commit f39d0ecfc4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 4 deletions

9
.gitignore vendored
View File

@ -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
.vscode
# Standard configuration file names
.corso_test.toml
.corso.toml

View File

@ -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)
}