add repo connect s3 integration test (#192)
* add repo connect s3 integration test
This commit is contained in:
parent
1957de09d2
commit
f39d0ecfc4
7
.gitignore
vendored
7
.gitignore
vendored
@ -11,8 +11,9 @@
|
|||||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||||
*.out
|
*.out
|
||||||
|
|
||||||
# Dependency directories (remove the comment below to include it)
|
|
||||||
# vendor/
|
|
||||||
|
|
||||||
# IDE
|
# IDE
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
|
# Standard configuration file names
|
||||||
|
.corso_test.toml
|
||||||
|
.corso.toml
|
||||||
@ -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)
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user