carloea2 commented on code in PR #4136:
URL: https://github.com/apache/texera/pull/4136#discussion_r2659349986
##########
file-service/src/test/scala/org/apache/texera/service/MockLakeFS.scala:
##########
@@ -87,11 +99,44 @@ trait MockLakeFS extends ForAllTestContainer with
BeforeAndAfterAll { self: Suit
def lakefsBaseUrl: String =
s"http://${lakefs.host}:${lakefs.mappedPort(8000)}"
def minioEndpoint: String = s"http://${minio.host}:${minio.mappedPort(9000)}"
+ def lakefsApiBasePath: String = s"$lakefsBaseUrl/api/v1"
+
+ // ---- Clients (lazy so they initialize after containers are started) ----
+
+ lazy val lakefsApiClient: ApiClient = {
+ val apiClient = new ApiClient()
+ apiClient.setBasePath(lakefsApiBasePath)
+ // basic-auth for lakeFS API uses accessKey as username, secretKey as
password
+ apiClient.setUsername(lakefsAccessKeyID)
+ apiClient.setPassword(lakefsSecretAccessKey)
+ apiClient
+ }
+
+ lazy val repositoriesApi: RepositoriesApi = new
RepositoriesApi(lakefsApiClient)
+
+ /**
+ * S3 client pointed at MinIO.
+ *
+ * Notes:
+ * - Region can be any value for MinIO, but MUST match what your signing
expects.
+ * so we use that.
+ * - Path-style is important: http://host:port/bucket/key
+ */
+ lazy val s3Client: S3Client = {
+ val creds = AwsBasicCredentials.create("texera_minio", "password")
Review Comment:
We need credentials to initialize it, those ones are just temporal chosen
default for testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]