mirror of
https://github.com/versity/versitygw.git
synced 2026-09-24 00:44:23 +00:00
fix: skip integration tests not compatible in sidecar
A few tests are not yet compatible with sidecar mode. Add a test option to skip these when running sidecar tests.
This commit is contained in:
@@ -38,6 +38,7 @@ var (
|
||||
checksumDisable bool
|
||||
versioningEnabled bool
|
||||
azureTests bool
|
||||
sidecarTests bool
|
||||
tlsStatus bool
|
||||
parallel bool
|
||||
)
|
||||
@@ -116,6 +117,12 @@ func initTestCommands() []*cli.Command {
|
||||
Destination: &azureTests,
|
||||
Aliases: []string{"azure"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "sidecar-test-mode",
|
||||
Usage: "Skips tests that are not supported by Sidecar",
|
||||
Destination: &sidecarTests,
|
||||
Aliases: []string{"sidecar"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "parallel",
|
||||
Usage: "executes the tests concurrently",
|
||||
@@ -336,6 +343,9 @@ func getAction(tf testFunc) func(ctx *cli.Context) error {
|
||||
if azureTests {
|
||||
opts = append(opts, integration.WithAzureMode())
|
||||
}
|
||||
if sidecarTests {
|
||||
opts = append(opts, integration.WithSidecarMode())
|
||||
}
|
||||
if hostStyle {
|
||||
opts = append(opts, integration.WithHostStyle())
|
||||
}
|
||||
@@ -382,6 +392,9 @@ func extractIntTests() (commands []*cli.Command) {
|
||||
if azureTests {
|
||||
opts = append(opts, integration.WithAzureMode())
|
||||
}
|
||||
if sidecarTests {
|
||||
opts = append(opts, integration.WithSidecarMode())
|
||||
}
|
||||
|
||||
s := integration.NewS3Conf(opts...)
|
||||
err := testFunc(s)
|
||||
@@ -400,6 +413,12 @@ func extractIntTests() (commands []*cli.Command) {
|
||||
Destination: &azureTests,
|
||||
Aliases: []string{"azure"},
|
||||
},
|
||||
&cli.BoolFlag{
|
||||
Name: "sidecar-test-mode",
|
||||
Usage: "Skips tests that are not supported by Sidecar",
|
||||
Destination: &sidecarTests,
|
||||
Aliases: []string{"sidecar"},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user