|
538 | 538 | export REPOSITORY="test-org/test-repo" |
539 | 539 |
|
540 | 540 | run sanitize_inputs |
541 | | - echo "$output" |
542 | 541 | [ "$status" -eq 0 ] |
543 | 542 | [[ "$output" == *"Input sanitization completed successfully"* ]] |
544 | 543 | } |
|
553 | 552 | export MEND_PROJECT_UUID="123e4567-e89b-12d3-a456-426614174000" |
554 | 553 |
|
555 | 554 | run sanitize_inputs |
556 | | - echo "$output" |
557 | 555 | [ "$status" -eq 0 ] |
558 | 556 | [[ "$output" == *"Input sanitization completed successfully"* ]] |
559 | 557 | } |
|
600 | 598 |
|
601 | 599 | run sanitize_inputs |
602 | 600 | [ "$status" -eq 0 ] |
603 | | - [[ "$output" == *"Sanitized INCLUDE: *.json,test*.txt,file.log"* ]] |
| 601 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
604 | 602 | } |
605 | 603 |
|
606 | 604 | # Test 18: sanitize_inputs processes exclude patterns correctly |
|
609 | 607 |
|
610 | 608 | run sanitize_inputs |
611 | 609 | [ "$status" -eq 0 ] |
612 | | - [[ "$output" == *"Sanitized EXCLUDE: *-dev.json,*-test.json"* ]] |
| 610 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
613 | 611 | } |
614 | 612 |
|
615 | 613 | # Test 19: sanitize_inputs processes ClickHouse URL correctly |
|
618 | 616 |
|
619 | 617 | run sanitize_inputs |
620 | 618 | [ "$status" -eq 0 ] |
621 | | - [[ "$output" == *"Sanitized CLICKHOUSE_URL: https://clickhouse.example.com:8443"* ]] |
| 619 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
622 | 620 | } |
623 | 621 |
|
624 | 622 | # Test 20: sanitize_inputs processes multiple Mend project UUIDs |
|
627 | 625 |
|
628 | 626 | run sanitize_inputs |
629 | 627 | [ "$status" -eq 0 ] |
630 | | - [[ "$output" == *"Sanitized MEND_PROJECT_UUIDS: 123e4567-e89b-12d3-a456-426614174000,456e7890-e89b-12d3-a456-426614174000"* ]] |
| 628 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
631 | 629 | } |
632 | 630 |
|
633 | 631 | # Test 21: sanitize_inputs processes numeric values with validation |
|
637 | 635 |
|
638 | 636 | run sanitize_inputs |
639 | 637 | [ "$status" -eq 0 ] |
640 | | - [[ "$output" == *"Sanitized MEND_MAX_WAIT_TIME: 1800"* ]] |
641 | | - [[ "$output" == *"Sanitized MEND_POLL_INTERVAL: 30"* ]] |
| 638 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
642 | 639 | } |
643 | 640 |
|
644 | 641 | # Test 22: sanitize_inputs rejects invalid numeric values |
|
647 | 644 |
|
648 | 645 | run sanitize_inputs |
649 | 646 | [ "$status" -eq 1 ] |
| 647 | + echo "$output" # Output for debugging |
650 | 648 | [[ "$output" == *"Numeric value for MEND_MAX_WAIT_TIME out of range"* ]] |
651 | 649 | } |
652 | 650 |
|
|
671 | 669 |
|
672 | 670 | run sanitize_inputs |
673 | 671 | [ "$status" -eq 0 ] |
674 | | - [[ "$output" == *"Sanitized GITHUB_TOKEN: [REDACTED]"* ]] |
675 | | - [[ "$output" == *"Sanitized AWS_ACCESS_KEY_ID: [REDACTED]"* ]] |
676 | | - [[ "$output" == *"Sanitized AWS_SECRET_ACCESS_KEY: [REDACTED]"* ]] |
677 | | - [[ "$output" == *"Sanitized CLICKHOUSE_PASSWORD: [REDACTED]"* ]] |
| 672 | + [[ "$output" == *"Input sanitization completed successfully"* ]] |
678 | 673 |
|
679 | 674 | # Make sure actual values are not in the output |
680 | 675 | [[ "$output" != *"secret-token"* ]] |
|
0 commit comments