dell / terraform-provider-redfish

Terraform provider for Redfish REST APIs
https://registry.terraform.io/providers/dell/redfish/latest
Mozilla Public License 2.0
95 stars 21 forks source link

Session based auth #217

Closed Sakshi-dell closed 5 months ago

Sakshi-dell commented 5 months ago

open redfish_test.env: no such file or directory
=== RUN   TestAccRedfishBiosDataSource_basic
--- PASS: TestAccRedfishBiosDataSource_basic (13.00s)
=== RUN   TestAccRedfishiDRACDataSource_fetch
--- PASS: TestAccRedfishiDRACDataSource_fetch (10.47s)
=== RUN   TestAccRedfishFirmwareDataSource_basic
--- PASS: TestAccRedfishFirmwareDataSource_basic (86.05s)
=== RUN   TestAccRedfishStorageDataSource_fetch
--- PASS: TestAccRedfishStorageDataSource_fetch (58.88s)
=== RUN   TestAccRedfishSystemBoot_fetch
--- PASS: TestAccRedfishSystemBoot_fetch (14.17s)
=== RUN   TestAccRedfishSystemBoot_fetchInvalidID
--- PASS: TestAccRedfishSystemBoot_fetchInvalidID (1.56s)
=== RUN   TestAccRedfishVirtualMedia_fetch
--- PASS: TestAccRedfishVirtualMedia_fetch (11.37s)
=== RUN   TestAccRedfishCertificate_basic
    resource_certificate_test.go:33: Step 1/2 error: Error running pre-apply refresh: exit status 1

        Error: Read local file data source error

          with data.local_file.cert,
          on terraform_plugin_test.tf line 13, in data "local_file" "cert":
          13:       data "local_file" "cert" {

        The file at given path cannot be read.

        +Original Error: open : no such file or directory
--- FAIL: TestAccRedfishCertificate_basic (1.90s)
=== RUN   TestAccRedfishBios_basic
--- PASS: TestAccRedfishBios_basic (883.97s)
=== RUN   TestAccRedfishBios_InvalidSettings
--- PASS: TestAccRedfishBios_InvalidSettings (0.16s)
=== RUN   TestAccRedfishBios_InvalidAttributes
--- PASS: TestAccRedfishBios_InvalidAttributes (0.15s)
=== RUN   TestAccRedfishBios_Import
--- PASS: TestAccRedfishBios_Import (1.71s)
=== RUN   TestAccRedfishBootOrder_basic
--- PASS: TestAccRedfishBootOrder_basic (20.13s)
--- FAIL: TestAccRedfishBootOrder_basic (1.68s)
=== RUN   TestAccRedfishBootOrderOptions_basic
--- PASS: TestAccRedfishBootOrderOptions_basic (952.10s)
=== RUN   TestAccRedfishBootSourceOverride_basic
--- PASS: TestAccRedfishBootSourceOverride_basic (537.60s)
=== RUN   TestAccRedfishBootSourceOverride_updated
--- PASS: TestAccRedfishBootSourceOverride_updated (480.31s)
=== RUN   TestAccRedfishIDRACAttributesBasic
--- PASS: TestAccRedfishIDRACAttributesBasic (28.25s)
=== RUN   TestAccRedfishIDRACAttributesInvalidAttribute
--- PASS: TestAccRedfishIDRACAttributesInvalidAttribute (3.76s)
=== RUN   TestAccRedfishIDRACAttributeImport
--- PASS: TestAccRedfishIDRACAttributeImport (4.41s)
=== RUN   TestAccRedfishIDRACAttributeImportByFilter
--- PASS: TestAccRedfishIDRACAttributeImportByFilter (6.78s)
=== RUN   TestAccRedfishLCAttributesBasic
--- PASS: TestAccRedfishLCAttributesBasic (14.51s)
=== RUN   TestAccRedfishLCAttributesInvalidAttribute
--- PASS: TestAccRedfishLCAttributesInvalidAttribute (4.13s)
=== RUN   TestAccRedfishLCAttributesUpdate
--- PASS: TestAccRedfishLCAttributesUpdate (19.21s)
=== RUN   TestAccRedfishLCAttributeImport
--- PASS: TestAccRedfishLCAttributeImport (2.15s)
=== RUN   TestAccRedfishSystemAttributesBasic
--- PASS: TestAccRedfishSystemAttributesBasic (9.57s)
=== RUN   TestAccRedfishSystemAttributesInvalidAttribute
--- PASS: TestAccRedfishSystemAttributesInvalidAttribute (4.18s)
=== RUN   TestAccRedfishSystemAttributesUpdate
--- PASS: TestAccRedfishSystemAttributesUpdate (26.20s)
=== RUN   TestAccRedfishSystemAttributesImport
--- PASS: TestAccRedfishSystemAttributesImport (2.79s)
=== RUN   TestAccRedfishIdracFirmwareUpdateResource
    resource_redfish_idrac_firmware_update_test.go:30: Step 2/2 error: Error running apply: exit status 1

        Error: Check repository Updates job error

          with redfish_idrac_firmware_update.update2,
          on terraform_plugin_test.tf line 3, in resource "redfish_idrac_firmware_update" "update2":
           3:   resource "redfish_idrac_firmware_update" "update2" {

        The download protocol specified is not supported.
--- FAIL: TestAccRedfishIdracFirmwareUpdateResource (45.84s)
=== RUN   TestAccRedfishIdracFirmwareUpdateResourceFail
--- PASS: TestAccRedfishIdracFirmwareUpdateResourceFail (0.20s)
=== RUN   TestAccRedfishManagerReset_Invalid_ResetType_Negative
--- PASS: TestAccRedfishManagerReset_Invalid_ResetType_Negative (0.16s)
=== RUN   TestAccRedfishManagerReset_Invalid_ManagerID_Negative
    resource_redfish_manager_reset_test.go:44: Step 1/1, expected an error with pattern, no match on: Error running apply: exit status 1

        Error: Error while retrieving manager from redfish API

          with redfish_manager_reset.manager_reset,
          on terraform_plugin_test.tf line 3, in resource "redfish_manager_reset" "manager_reset":
           3:   resource "redfish_manager_reset" "manager_reset" {

        invalid Manager ID provided
--- FAIL: TestAccRedfishManagerReset_Invalid_ManagerID_Negative (2.02s)
=== RUN   TestAccRedfishManagerReset_Update_Negative
    resource_redfish_manager_reset_test.go:58: Step 1/2 error: Error running apply: exit status 1

        Error: Error resetting manager

          with redfish_manager_reset.manager_reset,
          on terraform_plugin_test.tf line 3, in resource "redfish_manager_reset" "manager_reset":
           3:   resource "redfish_manager_reset" "manager_reset" {

        401: {
            "error": {
                "code": "Base.1.8.GeneralError",
                "message": "A general error has occurred. See ExtendedInfo for more information.",
                "@Message.ExtendedInfo": [
                {
                    "@odata.type": "#Message.v1_1_0.Message",
                    "MessageId": "Base.1.8.AccessDenied",
                    "Message": "The authentication credentials included with this request are missing or invalid.",
                "MessageArgs": [],
                "MessageArgs@odata.count": 0,
                "RelatedProperties":[],
                "RelatedProperties@odata.count": 0,
                "Severity": "Critical",
                "Resolution": "Attempt to ensure that the URI is correct and that the
        service has the appropriate credentials."
                }
                ]
            }
        }

--- FAIL: TestAccRedfishManagerReset_Update_Negative (1.87s)
=== RUN   TestAccRedfishManagerReset_Create
    resource_redfish_manager_reset_test.go:78: Step 1/1 error: Error running apply: exit status 1

        Error: Error resetting manager

          with redfish_manager_reset.manager_reset,
          on terraform_plugin_test.tf line 3, in resource "redfish_manager_reset" "manager_reset":
           3:   resource "redfish_manager_reset" "manager_reset" {

        401: {
            "error": {
                "code": "Base.1.8.GeneralError",
                "message": "A general error has occurred. See ExtendedInfo for more information.",
                "@Message.ExtendedInfo": [
                {
                    "@odata.type": "#Message.v1_1_0.Message",
                    "MessageId": "Base.1.8.AccessDenied",
                    "Message": "The authentication credentials included with this request are missing or invalid.",
                "MessageArgs": [],
                "MessageArgs@odata.count": 0,
                "RelatedProperties":[],
                "RelatedProperties@odata.count": 0,
                "Severity": "Critical",
                "Resolution": "Attempt to ensure that the URI is correct and that the
        service has the appropriate credentials."
                }
                ]
            }
        }

--- FAIL: TestAccRedfishManagerReset_Create (1.85s)
=== RUN   TestAccRedfishPowerT1
    resource_redfish_power_test.go:31: Step 6/9 error: Check failed: Check 1/1 error: redfish_power.system_power: Attribute 'power_state' expected "Reset_On", got "Off"
--- FAIL: TestAccRedfishPowerT1 (266.00s)
=== RUN   TestAccRedfishPower_Invalid
--- PASS: TestAccRedfishPower_Invalid (0.16s)
=== RUN   TestAccRedfishSCP
--- PASS: TestAccRedfishSCP (82.15s)
=== RUN   TestAccRedfishSCPInvalid
--- PASS: TestAccRedfishSCPInvalid (0.54s)
=== RUN   TestAccRedfishSimpleUpdate_basic
--- PASS: TestAccRedfishSimpleUpdate_basic (397.22s)
=== RUN   TestAccRedfishSimpleUpdate_InvalidProto
--- PASS: TestAccRedfishSimpleUpdate_InvalidProto (30.05s)
=== RUN   TestAccRedfishStorageDataSource_fetch
--- PASS: TestAccRedfishStorageDataSource_fetch (73.44s)
=== RUN   TestAccRedfishStorageVolume_InvalidController
--- PASS: TestAccRedfishStorageVolume_InvalidController (2.62s)
=== RUN   TestAccRedfishStorageVolume_InvalidDrive
--- PASS: TestAccRedfishStorageVolume_InvalidDrive (3.41s)
=== RUN   TestAccRedfishStorageVolume_InvalidVolumeType
--- PASS: TestAccRedfishStorageVolume_InvalidVolumeType (3.55s)
=== RUN   TestAccRedfishStorageVolumeUpdate_basic
--- PASS: TestAccRedfishStorageVolumeUpdate_basic (425.92s)
=== RUN   TestAccRedfishStorageVolumeCreate_basic
--- PASS: TestAccRedfishStorageVolumeCreate_basic (282.54s)
=== RUN   TestAccRedfishStorageVolume_basic
--- PASS: TestAccRedfishStorageVolume_basic (271.09s)
=== RUN   TestAccRedfishStorageVolume_OnReset
--- PASS: TestAccRedfishStorageVolume_OnReset (462.84s)
=== RUN   TestAccRedfishUserPassword_basic
--- PASS: TestAccRedfishUserPassword_basic (44.67s)
=== RUN   TestAccRedfishUser_basic
--- PASS: TestAccRedfishUser_basic (50.82s)
=== RUN   TestAccRedfishUserInvalid_basic
--- PASS: TestAccRedfishUserInvalid_basic (0.16s)
=== RUN   TestAccRedfishUserExisting_basic
--- PASS: TestAccRedfishUserExisting_basic (9.30s)
=== RUN   TestAccRedfishUserUpdateInvalid_basic
--- PASS: TestAccRedfishUserUpdateInvalid_basic (44.96s)
=== RUN   TestAccRedfishUserUpdateInvalidId_basic
--- PASS: TestAccRedfishUserUpdateInvalidId_basic (8.81s)
=== RUN   TestAccRedfishUserUpdateId_basic
--- PASS: TestAccRedfishUserUpdateId_basic (41.64s)
=== RUN   TestAccRedfishUserUpdateUser_basic
--- PASS: TestAccRedfishUserUpdateUser_basic (63.71s)
=== RUN   TestAccRedfishUserImportUser_basic
--- PASS: TestAccRedfishUserImportUser_basic (6.27s)
=== RUN   TestAccRedfishUserImportUser_invalid
--- PASS: TestAccRedfishUserImportUser_invalid (6.44s)
=== RUN   TestAccRedfishUserValidation_basic
--- PASS: TestAccRedfishUserValidation_basic (40.94s)
=== RUN   TestAccRedfishVirtualMedia_basic
--- PASS: TestAccRedfishVirtualMedia_basic (16.19s)
=== RUN   TestAccRedfishVirtualMedia_InvalidImage_Negative
--- PASS: TestAccRedfishVirtualMedia_InvalidImage_Negative (0.38s)
=== RUN   TestAccRedfishVirtualMedia_InvalidTransferMethod_Negative
--- PASS: TestAccRedfishVirtualMedia_InvalidTransferMethod_Negative (0.42s)
=== RUN   TestAccRedfishVirtualMedia_InvalidTransferProtocol_Negative
--- PASS: TestAccRedfishVirtualMedia_InvalidTransferProtocol_Negative (3.67s)
=== RUN   TestAccRedfishVirtualMediaNoMediaNegative_basic
--- PASS: TestAccRedfishVirtualMediaNoMediaNegative_basic (11.81s)
=== RUN   TestAccRedfishVirtualMediaServer2_basic
--- PASS: TestAccRedfishVirtualMediaServer2_basic (10.35s)
=== RUN   TestAccRedfishVirtualMediaServer2_InvalidTransferProtocol_Negative
--- PASS: TestAccRedfishVirtualMediaServer2_InvalidTransferProtocol_Negative (2.91s)
=== RUN   TestAccRedfishVirtualMediaServer2Update_InvalidTransferProtocol_Negative
--- PASS: TestAccRedfishVirtualMediaServer2Update_InvalidTransferProtocol_Negative (15.32s)
=== RUN   TestAccRedfishVirtualMediaUpdate_basic
--- PASS: TestAccRedfishVirtualMediaUpdate_basic (22.66s)
=== RUN   TestAccRedfishVirtualMediaUpdate_InvalidImage_Negative
--- PASS: TestAccRedfishVirtualMediaUpdate_InvalidImage_Negative (10.37s)
=== RUN   TestAccRedfishVirtualMediaUpdate_InvalidTransferMethod_Negative
--- PASS: TestAccRedfishVirtualMediaUpdate_InvalidTransferMethod_Negative (10.18s)
FAIL
coverage: 70.3% of statements
FAIL    terraform-provider-redfish/redfish/provider 4449.596s
FAIL

All test cases passed except manager reset and certificate which will be taken up as a part of phase 2 development