Skip to content

Commit

Permalink
add detail debugging statements
Browse files Browse the repository at this point in the history
  • Loading branch information
AssahBismarkabah committed Oct 7, 2024
1 parent 839d7b1 commit 2c0e857
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,17 @@ jobs:
distribution: 'temurin'
cache: 'maven'

- name: Step 3.5 - Display Environment Info
run: env

- name: Step 3 - Cache Docker images.
uses: ScribeMD/[email protected]
with:
key: docker-${{ runner.os }}

- name: Step 4 - Build & Test with Debugging
run: mvn clean verify -ntp -PIT -X
- name: Step 4 - Build & Test
run: mvn clean verify -ntp -PIT

- name: Step 5 - Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
verbose: true
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,9 @@ void init() {
void list() {
createFileWithMessage();

// Log root and fileWithMsg URIs for debugging
log.info("Root URI: " + root.location().toASCIIString());
log.info("fileWithMsg URI: " + fileWithMsg.location().toASCIIString());
// // Log root and fileWithMsg URIs for debugging
// log.info("Root URI: " + root.location().toASCIIString());
// log.info("fileWithMsg URI: " + fileWithMsg.location().toASCIIString());

Stream<AbsoluteLocation<ResolvedResource>> list = storageService.list(root);
List<AbsoluteLocation<ResolvedResource>> resultList = list.collect(Collectors.toList());
Expand All @@ -106,25 +106,21 @@ void list() {

// Log the returned URI
String uriString = resultList.get(0).location().toASCIIString();
log.info("Returned URI in CI/CD: " + uriString);
// log.info("Returned URI in CI/CD: " + uriString);

// Add environment-related logging
log.info("Running in region: " + System.getenv("AWS_REGION"));
log.info("S3 Bucket Name: " + bucketName);
log.info("AWS_ACCESS_KEY_ID: " + System.getenv("AWS_ACCESS_KEY_ID"));
log.info("AWS_SECRET_ACCESS_KEY: " + System.getenv("AWS_SECRET_ACCESS_KEY"));
log.info("AWS_REGION: " + System.getenv("AWS_REGION"));
log.info("Minio container started at port: " + minio.getMappedPort(9000));
log.info("Minio container is running: " + minio.isRunning());
// // Add environment-related logging
// log.info("Running in region: " + System.getenv("AWS_REGION"));
// log.info("S3 Bucket Name: " + bucketName);
// log.info("AWS_ACCESS_KEY_ID: " + System.getenv("AWS_ACCESS_KEY_ID"));
// log.info("AWS_SECRET_ACCESS_KEY: " + System.getenv("AWS_SECRET_ACCESS_KEY"));
// log.info("AWS_REGION: " + System.getenv("AWS_REGION"));
// log.info("Minio container started at port: " + minio.getMappedPort(9000));
// log.info("Minio container is running: " + minio.isRunning());

// Assert that the URI contains "s3"

// Assert that the URI contains "file"
assertThat(uriString).contains(FILE);
}



@Test
void testListOutOfStandardListFilesLimit() {
int numberOfFilesOverLimit = 1010;
Expand Down

0 comments on commit 2c0e857

Please sign in to comment.