Uploaded image for project: 'Cost Management'
  1. Cost Management
  2. COST-5222

Nise GCP Unit Test fails when is the 1st of the month

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2024-Jul-12
    • None
    • None
    • None
    • Low

      If it is the first day of the month, the 
      test_gcp_create_report_without_write_monthly raises an error.
       

      ======================================================================
      ERROR: test_gcp_create_report_without_write_monthly (test_report.GCPReportTestCase)
      Test that monthly file is not created by default.
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/home/runner/work/nise/nise/nise/report.py", line 138, in _remove_files
          os.remove(file_path)
      FileNotFoundError: [Errno 2] No such file or directory: '/home/runner/work/nise/nise/test_report.csv'
      
      During handling of the above exception, another exception occurred:
      
      Traceback (most recent call last):
        File "/home/runner/work/nise/nise/tests/test_report.py", line 1624, in test_gcp_create_report_without_write_monthly
          gcp_create_report(options)
        File "/home/runner/work/nise/nise/nise/report.py", line 1198, in gcp_create_report
          _remove_files(monthly_files)
        File "/home/runner/work/nise/nise/nise/report.py", line 141, in _remove_files
          raise FileNotFoundError
      FileNotFoundError
      
      ----------------------------------------------------------------------
      Ran 428 tests in 71.207s
      
      FAILED (errors=1) 

      We have to investigate why it is occurring and fix it to avoid future issues.
       
       
       

       

            rh-ee-lbacciot Lucas Bacciotti
            rh-ee-lbacciot Lucas Bacciotti
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: