Kong / deck

decK: Configuration management and drift detection for Kong
https://docs.konghq.com/deck/overview
Apache License 2.0
445 stars 130 forks source link

`TestImports` fails on CI #1408

Closed pmalek closed 2 weeks ago

pmalek commented 2 months ago

Problem statement

TestImports fails on CI https://github.com/Kong/deck/actions/runs/11046638654/job/30686346034#step:4:171

=== RUN   TestImports
    generate_resource_test.go:206: 
            Error Trace:    /home/runner/work/deck/deck/kong2tf/generate_resource_test.go:206
            Error:          Not equal: 
                            expected: []string{"resource", "\"konnect_entity_type\"", "\"name\"", "{", "field1", "=", "\"basic_string\"", "field2", "=", "{", "nested", "=", "\"subkey\"", "}", "control_plane_id", "=", "var.control_plane_id", "}", "import", "{", "to", "=", "konnect_entity_type.name", "id", "=", "\"{\\\"id\\\":", "\\\"some_id\\\",", "\\\"field2_nested\\\":", "\\\"subkey\\\",", "\\\"control_plane_id\\\":", "\\\"abc-123\\\"}\"", "}"}
                            actual  : []string{"resource", "\"konnect_entity_type\"", "\"name\"", "{", "field1", "=", "\"basic_string\"", "field2", "=", "{", "nested", "=", "\"subkey\"", "}", "control_plane_id", "=", "var.control_plane_id", "}", "import", "{", "to", "=", "konnect_entity_type.name", "id", "=", "\"{\\\"field2_nested\\\":", "\\\"subkey\\\",", "\\\"id\\\":", "\\\"some_id\\\",", "\\\"control_plane_id\\\":", "\\\"abc-123\\\"}\"", "}"}

                            Diff:
                            --- Expected
                            +++ Actual
                            @@ -26,6 +26,6 @@
                              (string) (len=1) "=",
                            - (string) (len=9) "\"{\\\"id\\\":",
                            + (string) (len=20) "\"{\\\"field2_nested\\\":",
                            + (string) (len=11) "\\\"subkey\\\",",
                            + (string) (len=7) "\\\"id\\\":",
                              (string) (len=12) "\\\"some_id\\\",",
                            - (string) (len=18) "\\\"field2_nested\\\":",
                            - (string) (len=11) "\\\"subkey\\\",",
                              (string) (len=21) "\\\"control_plane_id\\\":",
            Test:           TestImports
--- FAIL: TestImports (0.00s)