Skip to content

Commit 09acb28

Browse files
committed
refactor: replace --storage-config with individual storage parameters in e2e tests
1 parent 43ed376 commit 09acb28

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

e2e_test.go

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,11 @@ func testS3Storage(ctx context.Context, t *testing.T, clickhouseContainer testco
6262

6363
runMainTestScenario(ctx, t, clickhouseContainer, []string{
6464
"--storage-type", "s3",
65-
"--storage-config", fmt.Sprintf("bucket=testbucket,region=us-east-1,endpoint=http://%s:%s", minioHost, minioPort.Port()),
65+
"--storage-bucket", "testbucket",
66+
"--storage-region", "us-east-1",
67+
"--storage-path", "",
68+
"--host", minioHost,
69+
"--port", minioPort.Port(),
6670
})
6771
}
6872

@@ -116,7 +120,10 @@ func testGCSStorage(ctx context.Context, t *testing.T, clickhouseContainer testc
116120

117121
runMainTestScenario(ctx, t, clickhouseContainer, []string{
118122
"--storage-type", "gcs",
119-
"--storage-config", fmt.Sprintf("bucket=testbucket,endpoint=http://%s:%s", gcsHost, gcsPort.Port()),
123+
"--storage-bucket", "testbucket",
124+
"--storage-path", "",
125+
"--host", gcsHost,
126+
"--port", gcsPort.Port(),
120127
})
121128
}
122129

@@ -135,7 +142,12 @@ func testAzureBlobStorage(ctx context.Context, t *testing.T, clickhouseContainer
135142

136143
runMainTestScenario(ctx, t, clickhouseContainer, []string{
137144
"--storage-type", "azblob",
138-
"--storage-config", fmt.Sprintf("account=devstoreaccount1,key=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==,container=testcontainer,endpoint=http://%s:%s/devstoreaccount1", azuriteHost, azuritePort.Port()),
145+
"--storage-account", "devstoreaccount1",
146+
"--storage-key", "Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==",
147+
"--storage-container", "testcontainer",
148+
"--storage-path", "",
149+
"--host", azuriteHost,
150+
"--port", azuritePort.Port(),
139151
})
140152
}
141153

@@ -154,7 +166,10 @@ func testFTPStorage(ctx context.Context, t *testing.T, clickhouseContainer testc
154166

155167
runMainTestScenario(ctx, t, clickhouseContainer, []string{
156168
"--storage-type", "ftp",
157-
"--storage-config", fmt.Sprintf("host=%s:%s,user=testuser,password=testpass", ftpHost, ftpPort.Port()),
169+
"--storage-host", fmt.Sprintf("%s:%s", ftpHost, ftpPort.Port()),
170+
"--storage-user", "testuser",
171+
"--storage-password", "testpass",
172+
"--storage-path", "",
158173
})
159174
}
160175

@@ -173,7 +188,10 @@ func testSFTPStorage(ctx context.Context, t *testing.T, clickhouseContainer test
173188

174189
runMainTestScenario(ctx, t, clickhouseContainer, []string{
175190
"--storage-type", "sftp",
176-
"--storage-config", fmt.Sprintf("host=%s:%s,user=testuser,password=testpass", sftpHost, sftpPort.Port()),
191+
"--storage-host", fmt.Sprintf("%s:%s", sftpHost, sftpPort.Port()),
192+
"--storage-user", "testuser",
193+
"--storage-password", "testpass",
194+
"--storage-path", "",
177195
})
178196
}
179197

0 commit comments

Comments
 (0)